C# 클래스 RagePixel2.Utility

파일 보기 프로젝트 열기: JuhaKiili/RagePixel2

공개 메소드들

메소드 설명
CreateNewSprite ( int sizeX, int sizeY ) : Sprite
DrawDebugPoint ( Vector3 point ) : void
DrawPaintGizmo ( Vector2 screenPosition, Color color, Color shadowColor, Brush brush, Transform transform, Sprite sprite ) : void
DrawPixelLine ( Texture2D texture, Brush brush, IntVector2 p1, IntVector2 p2 ) : void
DrawRectangle ( Vector3 worldPosition1, Vector3 worldPosition2, Color color ) : void
DrawSpriteBounds ( Color color, Color shadowColor, Transform transform, Sprite sprite ) : void
GetDefaultPixels ( int sizeX, int sizeY ) : UnityEngine.Color32[]
GetNormalizedPivot ( Sprite sprite ) : Vector2
GetPixelMarqueeRect ( IntVector2 pixelA, IntVector2 pixelB ) : Rect
GetPixels ( Sprite sprite ) : Color[]
GetPixelsToUnits ( Sprite sprite ) : float
GetSceneViewCenter ( ) : Vector3
GetYReversed ( Color colors, IntVector2 size ) : Color[]
LocalToScreen ( Vector3 localPosition, Transform transform ) : Vector2
LocalToUV ( Vector3 localPosition, Sprite sprite ) : Vector2
LocalToUV ( Vector3 localPosition, Sprite sprite, bool clamp ) : Vector2
LocalToWorld ( Vector3 localPosition, Transform transform ) : Vector3
PaintColorField ( Color value, float width, float height ) : Color
PixelInBounds ( IntVector2 pixelPosition, Sprite sprite ) : bool
PixelToScreen ( IntVector2 pixelPosition, Transform transform, Sprite sprite ) : Vector2
PixelToScreen ( IntVector2 pixelPosition, Transform transform, Sprite sprite, bool clamp ) : Vector2
PixelToUV ( IntVector2 pixel, Sprite sprite ) : Vector2
PixelToUV ( IntVector2 pixel, Sprite sprite, bool clamp ) : Vector2
PixelToWorld ( IntVector2 pixelPosition ) : Vector2
PixelToWorld ( IntVector2 pixelPosition, Transform transform, Sprite sprite ) : Vector3
PixelToWorld ( IntVector2 pixelPosition, Transform transform, Sprite sprite, bool clamp ) : Vector3
SameColor ( Color a, Color b ) : bool
SaveImageData ( Sprite sprite, bool reimport ) : void
ScreenToLocal ( Vector2 screenPosition, Transform transform ) : Vector3
ScreenToPixel ( Vector2 screenPosition, Transform transform, Sprite sprite ) : IntVector2
ScreenToPixel ( Vector2 screenPosition, Transform transform, Sprite sprite, bool clamp ) : IntVector2
ScreenToUV ( Vector2 screenPosition, Transform transform, Sprite sprite ) : Vector2
ScreenToUV ( Vector2 screenPosition, Transform transform, Sprite sprite, bool clamp ) : Vector2
ScreenToWorld ( Vector2 screenPosition ) : Vector3
ScreenToWorld ( Vector2 screenPosition, Transform transform ) : Vector3
SetPixelsClamped ( Texture2D texture, IntVector2 position, IntVector2 size, Color colors ) : void
ShowColorPicker ( Color color ) : void
UVToLocal ( Vector2 uv, Sprite sprite ) : Vector3
UVToLocal ( Vector2 uv, Sprite sprite, bool clamp ) : Vector3
UVToPixel ( Vector2 uv, Sprite sprite ) : IntVector2
UVToPixel ( Vector2 uv, Sprite sprite, bool clamp ) : IntVector2
WorldToLocal ( Vector3 worldPosition, Transform transform ) : Vector3
WorldToPixel ( Vector2 worldPosition ) : IntVector2
WorldToPixel ( Vector2 worldPosition, Transform transform, Sprite sprite ) : IntVector2
WorldToPixel ( Vector2 worldPosition, Transform transform, Sprite sprite, bool clamp ) : IntVector2
WorldToScreen ( Vector3 worldPosition, Transform transform ) : Vector2

비공개 메소드들

메소드 설명
CreateDefaultSpriteTexture ( int sizeX, int sizeY ) : Texture2D
CreateNewSprite ( string path, int sizeX, int sizeY ) : Sprite
GetAlignedPivot ( SpriteAlignment alignment ) : Vector2
GetDefaultColor ( ) : Color
GetPointsOnLine ( int x0, int y0, int x1, int y1 ) : IEnumerable
GetTextureImporter ( Sprite sprite ) : TextureImporter
SetDefaultSpriteSettings ( TextureImporter &textureImporter ) : void

메소드 상세

CreateNewSprite() 공개 정적인 메소드

public static CreateNewSprite ( int sizeX, int sizeY ) : Sprite
sizeX int
sizeY int
리턴 UnityEngine.Sprite

DrawDebugPoint() 공개 정적인 메소드

public static DrawDebugPoint ( Vector3 point ) : void
point Vector3
리턴 void

DrawPaintGizmo() 공개 정적인 메소드

public static DrawPaintGizmo ( Vector2 screenPosition, Color color, Color shadowColor, Brush brush, Transform transform, Sprite sprite ) : void
screenPosition Vector2
color Color
shadowColor Color
brush Brush
transform UnityEngine.Transform
sprite UnityEngine.Sprite
리턴 void

DrawPixelLine() 공개 정적인 메소드

public static DrawPixelLine ( Texture2D texture, Brush brush, IntVector2 p1, IntVector2 p2 ) : void
texture UnityEngine.Texture2D
brush Brush
p1 Assets.RagePixel2.Editor.Utility.IntVector2
p2 Assets.RagePixel2.Editor.Utility.IntVector2
리턴 void

DrawRectangle() 공개 정적인 메소드

public static DrawRectangle ( Vector3 worldPosition1, Vector3 worldPosition2, Color color ) : void
worldPosition1 Vector3
worldPosition2 Vector3
color Color
리턴 void

DrawSpriteBounds() 공개 정적인 메소드

public static DrawSpriteBounds ( Color color, Color shadowColor, Transform transform, Sprite sprite ) : void
color Color
shadowColor Color
transform UnityEngine.Transform
sprite UnityEngine.Sprite
리턴 void

GetDefaultPixels() 공개 정적인 메소드

public static GetDefaultPixels ( int sizeX, int sizeY ) : UnityEngine.Color32[]
sizeX int
sizeY int
리턴 UnityEngine.Color32[]

GetNormalizedPivot() 공개 정적인 메소드

public static GetNormalizedPivot ( Sprite sprite ) : Vector2
sprite UnityEngine.Sprite
리턴 Vector2

GetPixelMarqueeRect() 공개 정적인 메소드

public static GetPixelMarqueeRect ( IntVector2 pixelA, IntVector2 pixelB ) : Rect
pixelA Assets.RagePixel2.Editor.Utility.IntVector2
pixelB Assets.RagePixel2.Editor.Utility.IntVector2
리턴 UnityEngine.Rect

GetPixels() 공개 정적인 메소드

public static GetPixels ( Sprite sprite ) : Color[]
sprite UnityEngine.Sprite
리턴 Color[]

GetPixelsToUnits() 공개 정적인 메소드

public static GetPixelsToUnits ( Sprite sprite ) : float
sprite UnityEngine.Sprite
리턴 float

GetSceneViewCenter() 공개 정적인 메소드

public static GetSceneViewCenter ( ) : Vector3
리턴 Vector3

GetYReversed() 공개 정적인 메소드

public static GetYReversed ( Color colors, IntVector2 size ) : Color[]
colors Color
size Assets.RagePixel2.Editor.Utility.IntVector2
리턴 Color[]

LocalToScreen() 공개 정적인 메소드

public static LocalToScreen ( Vector3 localPosition, Transform transform ) : Vector2
localPosition Vector3
transform UnityEngine.Transform
리턴 Vector2

LocalToUV() 공개 정적인 메소드

public static LocalToUV ( Vector3 localPosition, Sprite sprite ) : Vector2
localPosition Vector3
sprite UnityEngine.Sprite
리턴 Vector2

LocalToUV() 공개 정적인 메소드

public static LocalToUV ( Vector3 localPosition, Sprite sprite, bool clamp ) : Vector2
localPosition Vector3
sprite UnityEngine.Sprite
clamp bool
리턴 Vector2

LocalToWorld() 공개 정적인 메소드

public static LocalToWorld ( Vector3 localPosition, Transform transform ) : Vector3
localPosition Vector3
transform UnityEngine.Transform
리턴 Vector3

PaintColorField() 공개 정적인 메소드

public static PaintColorField ( Color value, float width, float height ) : Color
value Color
width float
height float
리턴 Color

PixelInBounds() 공개 정적인 메소드

public static PixelInBounds ( IntVector2 pixelPosition, Sprite sprite ) : bool
pixelPosition Assets.RagePixel2.Editor.Utility.IntVector2
sprite UnityEngine.Sprite
리턴 bool

PixelToScreen() 공개 정적인 메소드

public static PixelToScreen ( IntVector2 pixelPosition, Transform transform, Sprite sprite ) : Vector2
pixelPosition Assets.RagePixel2.Editor.Utility.IntVector2
transform UnityEngine.Transform
sprite UnityEngine.Sprite
리턴 Vector2

PixelToScreen() 공개 정적인 메소드

public static PixelToScreen ( IntVector2 pixelPosition, Transform transform, Sprite sprite, bool clamp ) : Vector2
pixelPosition Assets.RagePixel2.Editor.Utility.IntVector2
transform UnityEngine.Transform
sprite UnityEngine.Sprite
clamp bool
리턴 Vector2

PixelToUV() 공개 정적인 메소드

public static PixelToUV ( IntVector2 pixel, Sprite sprite ) : Vector2
pixel Assets.RagePixel2.Editor.Utility.IntVector2
sprite UnityEngine.Sprite
리턴 Vector2

PixelToUV() 공개 정적인 메소드

public static PixelToUV ( IntVector2 pixel, Sprite sprite, bool clamp ) : Vector2
pixel Assets.RagePixel2.Editor.Utility.IntVector2
sprite UnityEngine.Sprite
clamp bool
리턴 Vector2

PixelToWorld() 공개 정적인 메소드

public static PixelToWorld ( IntVector2 pixelPosition ) : Vector2
pixelPosition Assets.RagePixel2.Editor.Utility.IntVector2
리턴 Vector2

PixelToWorld() 공개 정적인 메소드

public static PixelToWorld ( IntVector2 pixelPosition, Transform transform, Sprite sprite ) : Vector3
pixelPosition Assets.RagePixel2.Editor.Utility.IntVector2
transform UnityEngine.Transform
sprite UnityEngine.Sprite
리턴 Vector3

PixelToWorld() 공개 정적인 메소드

public static PixelToWorld ( IntVector2 pixelPosition, Transform transform, Sprite sprite, bool clamp ) : Vector3
pixelPosition Assets.RagePixel2.Editor.Utility.IntVector2
transform UnityEngine.Transform
sprite UnityEngine.Sprite
clamp bool
리턴 Vector3

SameColor() 공개 정적인 메소드

public static SameColor ( Color a, Color b ) : bool
a Color
b Color
리턴 bool

SaveImageData() 공개 정적인 메소드

public static SaveImageData ( Sprite sprite, bool reimport ) : void
sprite UnityEngine.Sprite
reimport bool
리턴 void

ScreenToLocal() 공개 정적인 메소드

public static ScreenToLocal ( Vector2 screenPosition, Transform transform ) : Vector3
screenPosition Vector2
transform UnityEngine.Transform
리턴 Vector3

ScreenToPixel() 공개 정적인 메소드

public static ScreenToPixel ( Vector2 screenPosition, Transform transform, Sprite sprite ) : IntVector2
screenPosition Vector2
transform UnityEngine.Transform
sprite UnityEngine.Sprite
리턴 Assets.RagePixel2.Editor.Utility.IntVector2

ScreenToPixel() 공개 정적인 메소드

public static ScreenToPixel ( Vector2 screenPosition, Transform transform, Sprite sprite, bool clamp ) : IntVector2
screenPosition Vector2
transform UnityEngine.Transform
sprite UnityEngine.Sprite
clamp bool
리턴 Assets.RagePixel2.Editor.Utility.IntVector2

ScreenToUV() 공개 정적인 메소드

public static ScreenToUV ( Vector2 screenPosition, Transform transform, Sprite sprite ) : Vector2
screenPosition Vector2
transform UnityEngine.Transform
sprite UnityEngine.Sprite
리턴 Vector2

ScreenToUV() 공개 정적인 메소드

public static ScreenToUV ( Vector2 screenPosition, Transform transform, Sprite sprite, bool clamp ) : Vector2
screenPosition Vector2
transform UnityEngine.Transform
sprite UnityEngine.Sprite
clamp bool
리턴 Vector2

ScreenToWorld() 공개 정적인 메소드

public static ScreenToWorld ( Vector2 screenPosition ) : Vector3
screenPosition Vector2
리턴 Vector3

ScreenToWorld() 공개 정적인 메소드

public static ScreenToWorld ( Vector2 screenPosition, Transform transform ) : Vector3
screenPosition Vector2
transform UnityEngine.Transform
리턴 Vector3

SetPixelsClamped() 공개 정적인 메소드

public static SetPixelsClamped ( Texture2D texture, IntVector2 position, IntVector2 size, Color colors ) : void
texture UnityEngine.Texture2D
position Assets.RagePixel2.Editor.Utility.IntVector2
size Assets.RagePixel2.Editor.Utility.IntVector2
colors Color
리턴 void

ShowColorPicker() 공개 정적인 메소드

public static ShowColorPicker ( Color color ) : void
color Color
리턴 void

UVToLocal() 공개 정적인 메소드

public static UVToLocal ( Vector2 uv, Sprite sprite ) : Vector3
uv Vector2
sprite UnityEngine.Sprite
리턴 Vector3

UVToLocal() 공개 정적인 메소드

public static UVToLocal ( Vector2 uv, Sprite sprite, bool clamp ) : Vector3
uv Vector2
sprite UnityEngine.Sprite
clamp bool
리턴 Vector3

UVToPixel() 공개 정적인 메소드

public static UVToPixel ( Vector2 uv, Sprite sprite ) : IntVector2
uv Vector2
sprite UnityEngine.Sprite
리턴 Assets.RagePixel2.Editor.Utility.IntVector2

UVToPixel() 공개 정적인 메소드

public static UVToPixel ( Vector2 uv, Sprite sprite, bool clamp ) : IntVector2
uv Vector2
sprite UnityEngine.Sprite
clamp bool
리턴 Assets.RagePixel2.Editor.Utility.IntVector2

WorldToLocal() 공개 정적인 메소드

public static WorldToLocal ( Vector3 worldPosition, Transform transform ) : Vector3
worldPosition Vector3
transform UnityEngine.Transform
리턴 Vector3

WorldToPixel() 공개 정적인 메소드

public static WorldToPixel ( Vector2 worldPosition ) : IntVector2
worldPosition Vector2
리턴 Assets.RagePixel2.Editor.Utility.IntVector2

WorldToPixel() 공개 정적인 메소드

public static WorldToPixel ( Vector2 worldPosition, Transform transform, Sprite sprite ) : IntVector2
worldPosition Vector2
transform UnityEngine.Transform
sprite UnityEngine.Sprite
리턴 Assets.RagePixel2.Editor.Utility.IntVector2

WorldToPixel() 공개 정적인 메소드

public static WorldToPixel ( Vector2 worldPosition, Transform transform, Sprite sprite, bool clamp ) : IntVector2
worldPosition Vector2
transform UnityEngine.Transform
sprite UnityEngine.Sprite
clamp bool
리턴 Assets.RagePixel2.Editor.Utility.IntVector2

WorldToScreen() 공개 정적인 메소드

public static WorldToScreen ( Vector3 worldPosition, Transform transform ) : Vector2
worldPosition Vector3
transform UnityEngine.Transform
리턴 Vector2