Method | Description | |
---|---|---|
AddEventTriggerEvent ( EventTrigger te, EventTriggerType type, EventTriggerEvent func ) : void |
Add Event to Unity's Event Trigger(Script)
|
|
AddEventTriggerEvent ( EventTrigger te, EventTriggerType type, EventTriggerEventButtonSelection func, JCSUnity.JCS_ButtonSelection selection ) : void |
Add Event to Unity's Event Trigger(Script)
|
|
ApplyRandVector3 ( Vector3 trans, Vector3 randVec, |
Add random value to Vector3
|
|
AttachChildren ( RectTransform trans, List childs ) : void | ||
AttachChildren ( Transform trans, List childs ) : void |
Attach all childs to this transform.
|
|
BytesToString ( Array data, JCS_CharsetType charset ) : string |
Convert byte array to string by charset type.
|
|
CopyByteArray ( Array inBuf, int start, int len ) : byte[] |
Copy byte array to another byte array memory space.
|
|
DeleteAllFilesFromDir ( string dirPath ) : void |
Delete all files in directory.
|
|
DestroyAllTypeObjectInScene ( ) : void |
Destroy all the 'TYPE' object in the scene.
|
|
DestroyImmediateAllTypeObjectInScene ( ) : void |
Destroy all the 'TYPE' object in the scene.
|
|
DetachChildren ( RectTransform trans ) : List |
||
DetachChildren ( Transform trans ) : List |
Detttach all the child from one transform.
|
|
EnumSize ( ) : int |
Return the length of an enumerator.
|
|
EscapeURL ( string url ) : string |
Simple version of escape url.
|
|
FillSlot ( List inList, int len, with ) : List |
||
FillSlot ( Array inArray, int len, with ) : T[] |
Fill slots with initialize value type by length.
|
|
FindCloneObjectsOfTypeAll ( ) : T[] |
Find all the objects that are clone in the scene by type.
|
|
FindNotCloneObjectsOfTypeAll ( ) : T[] |
Find all the objects that are not clone in the scene by type.
|
|
FindObjectsOfTypeAllInHierarchy ( ) : T[] |
Find all objects that only ACTIVE in hierarchy.
|
|
ForceDetachChildren ( RectTransform trans ) : List |
||
ForceDetachChildren ( Transform trans ) : List |
Force to clean all the children, this will make sure the transform have 0 children transform.
|
|
ForceGetComponent ( MonoBehaviour mb ) : T |
Force to get a component, if not found we will add one then.
|
|
GetEasing ( JCS_TweenType type ) : TweenDelegate |
Return the easing function pointer base on tweener type.
|
|
GetFinalLocalEulerAngles ( Transform trans, Vector3 &inEulerAngles ) : Vector3 |
Multiply all the parent localEulerAngles to get the correct description of the transform information. ATTENTION(jenchieh): This will cause some performance, use it wisely.
|
|
GetImageRect ( Image img ) : Vector2 |
Returns the size of the image.
|
|
GetSpriteRendererRect ( SpriteRenderer sr ) : Vector2 |
Returns the size of the sprite renderer.
|
|
GetSpriteRendererRectWithNoScale ( SpriteRenderer sr ) : Vector2 |
Returns the size of the sprite renderer without the scale value multiply.
|
|
GetValues ( ) : IEnumerable |
Enum typed version casting. Source: http://stackoverflow.com/questions/972307/can-you-loop-through-all-enum-values
|
|
HasChild ( RectTransform trans ) : bool | ||
HasChild ( Transform trans ) : bool |
Return true, if transform has at least one children.
|
|
IncVec3 ( Vector3 val, float x, float y, float z ) : Vector3 | ||
IncVecX ( Vector3 val, float x ) : Vector3 |
Add the vector value.
|
|
IncVecY ( Vector3 val, float y ) : Vector3 | ||
IncVecZ ( Vector3 val, float z ) : Vector3 | ||
IsArrayEmpty ( Array list ) : bool |
Check if the list empty.
|
|
IsNumberString ( string str ) : bool |
Is the string the valid number to parse.
|
|
IsOverGUI ( ) : bool |
Check if mosue is over any UI element.
|
|
IsSameTribe ( JCS_2DLiveObject liveObj1, JCS_2DLiveObject liveObj2 ) : bool |
Check if the object are the same tribe.
|
|
IsScene ( string name ) : bool |
Check current scene's with NAME.
|
|
LastFileIndex ( string path, string prefixStr, string ext ) : int |
Method to do search directory and get the last file index.
|
|
ListPopBack ( List list ) : T |
Pop the last value from the list.
|
|
ListPopFront ( List list ) : T |
Pop the last value from the list.
|
|
LoopInArray ( int index, Array arr ) : int |
Loop in an array. (Array)
|
|
LoopInArray ( int index, List arr ) : int |
Loop in an array. (List)
|
|
MergeArrays ( ) : T[] |
Merge multiple arrays into one array.
|
|
MergeArrays2 ( Array arr1, Array arr2 ) : T[] |
Merging two array and return the new array.
|
|
MergeList ( ) : List |
Merging two list and return the new list.
|
|
MouseOverGUI ( RectTransform imageRect, RectTransform rootPanel = null ) : bool |
Solve the flash problem! (JCS_CheckableObject) Check if the mouse still on top of the image! ATTENTIOIN(jenchieh): this will not work on the resizable window.
|
|
MoveToTheLastChild ( Transform trans ) : void |
Move the object to the last child of the Unty's tree system(Hierarchy) transform.
|
|
ReattachSelf ( RectTransform trans, ReattachCallback callback ) : void | ||
ReattachSelf ( Transform trans, ReattachCallback callback ) : void |
Execution callback after detach and reattach.
|
|
RemoveEmptySlot ( List inList ) : List |
||
RemoveEmptySlot ( Array inArray ) : T[] |
Remove the empty slot in the array.
|
|
RemoveEmptySlotIncludeMissing ( List inList ) : List |
||
RemoveEmptySlotIncludeMissing ( Array inArray ) : T[] |
Remove the empty slot in the list including remove the missing gameobject too. I guess Unity do the CG collection later a while when you call 'Destory()' function. Before scripting layer acknowledge this game object is destory might be too late in some situation. This will avoid this type of issue/circumstance.
|
|
SetActiveToAllChildren ( Transform trans, bool act ) : void |
Active all the child in a transform.
|
|
SetEnableAllComponents ( Transform trans, bool act ) : void |
Set eabled/disabled to all component in a transform.
|
|
SetParentWithoutLosingInfo ( Transform trans, Transform parent ) : void |
Set the transform to onther transform in the hierarchy and without losing the info. Info: position, rotation, scale, etc.
|
|
SetVec3 ( Vector3 &val, float x, float y, float z ) : Vector3 | ||
SetVecX ( Vector3 &val, float x ) : Vector3 |
Set the vector value.
|
|
SetVecY ( Vector3 &val, float y ) : Vector3 | ||
SetVecZ ( Vector3 &val, float z ) : Vector3 | ||
SpawnAnimateObject ( RuntimeAnimatorController anim, int orderLayer = 15 ) : GameObject |
Spawn an animate object.
|
|
SpawnAnimateObjectDeathEvent ( RuntimeAnimatorController anim, int orderLayer = 15, int loopTimes = 1 ) : GameObject |
Spawn a animate object with the death event, so after the animate was played serval loop times the object will be destroyed.
|
|
SpawnGameObject ( string objectPath, Vector3 position = newVector3(), Quaternion rotation = newQuaternion() ) : GameObject |
Spawn a gmae object.
|
|
SpawnGameObject ( |
Spawn a gmae object.
|
|
StringToBytes ( string data, JCS_CharsetType charset ) : byte[] |
Convert string to byte array by charset type.
|
|
ToJson ( obj ) : string |
Return JSON by passing serializable object.
|
|
VectorDirection ( JCS_Vector3Direction direction ) : Vector3 |
Return direction of Unity's Vector system.
|
|
WithInAcceptRange ( float range, float acceptRange, float currentVal ) : bool |
Check the value within the range plus acceptable range.
|
|
WithInArrayRange ( int index, Array arr ) : bool |
With in array range. (Array)
|
|
WithInArrayRange ( int index, List arr ) : bool |
With in array range. (List)
|
|
WithInRange ( float minRange, float maxRange, float currentVal ) : bool |
Check the value within the range.
|
public static AddEventTriggerEvent ( EventTrigger te, EventTriggerType type, EventTriggerEvent func ) : void | ||
te | EventTrigger | |
type | EventTriggerType | |
func | EventTriggerEvent | |
return | void |
public static AddEventTriggerEvent ( EventTrigger te, EventTriggerType type, EventTriggerEventButtonSelection func, JCSUnity.JCS_ButtonSelection selection ) : void | ||
te | EventTrigger | |
type | EventTriggerType | |
func | EventTriggerEventButtonSelection | |
selection | JCSUnity.JCS_ButtonSelection | |
return | void |
public static ApplyRandVector3 ( Vector3 trans, Vector3 randVec, |
||
trans | Vector3 | transfrorm u want to apply. |
randVec | Vector3 | value for each axis. |
checks | check for eaxh axis. | |
return | Vector3 |
public static AttachChildren ( RectTransform trans, List childs ) : void | ||
trans | RectTransform | |
childs | List | |
return | void |
public static AttachChildren ( Transform trans, List childs ) : void | ||
trans | Transform | transform we want to add the childs to. |
childs | List | childs we want to add to transform. |
return | void |
public static BytesToString ( Array data, JCS_CharsetType charset ) : string | ||
data | Array | Byte array data to convert to string data. |
charset | JCS_CharsetType | Target charset type. |
return | string |
public static CopyByteArray ( Array inBuf, int start, int len ) : byte[] | ||
inBuf | Array | byte array to copy. |
start | int | Starting index to copy. |
len | int | Length to copy. |
return | byte[] |
public static DeleteAllFilesFromDir ( string dirPath ) : void | ||
dirPath | string | Target delete directory. |
return | void |
public static DestroyAllTypeObjectInScene ( ) : void | ||
return | void |
public static DestroyImmediateAllTypeObjectInScene ( ) : void | ||
return | void |
public static DetachChildren ( RectTransform trans ) : List |
||
trans | RectTransform | |
return | List |
public static DetachChildren ( Transform trans ) : List |
||
trans | Transform | transform you want to remove all /// the children under. |
return | List |
public static EscapeURL ( string url ) : string | ||
url | string | Url you want to escape. |
return | string |
public static FillSlot ( List inList, int len, with ) : List |
||
inList | List | |
len | int | |
return | List |
public static FillSlot ( Array inArray, int len, with ) : T[] | ||
inArray | Array | Array you would like to fill out. |
len | int | Target length to initialize. |
with | Initialize object type. | |
return | T[] |
public static FindCloneObjectsOfTypeAll ( ) : T[] | ||
return | T[] |
public static FindNotCloneObjectsOfTypeAll ( ) : T[] | ||
return | T[] |
public static FindObjectsOfTypeAllInHierarchy ( ) : T[] | ||
return | T[] |
public static ForceDetachChildren ( RectTransform trans ) : List |
||
trans | RectTransform | |
return | List |
public static ForceDetachChildren ( Transform trans ) : List |
||
trans | Transform | transform you want to remove all /// the children under. |
return | List |
public static ForceGetComponent ( MonoBehaviour mb ) : T | ||
mb | MonoBehaviour | Any MonoBehaviour. |
return | T |
public static GetEasing ( JCS_TweenType type ) : TweenDelegate | ||
type | JCS_TweenType | type of the tween formula |
return | TweenDelegate |
public static GetFinalLocalEulerAngles ( Transform trans, Vector3 &inEulerAngles ) : Vector3 | ||
trans | Transform | transform we want to get from and use /// it for parent. |
inEulerAngles | Vector3 | use to store the result. |
return | Vector3 |
public static GetImageRect ( Image img ) : Vector2 | ||
img | Image | |
return | Vector2 |
public static GetSpriteRendererRect ( SpriteRenderer sr ) : Vector2 | ||
sr | SpriteRenderer | |
return | Vector2 |
public static GetSpriteRendererRectWithNoScale ( SpriteRenderer sr ) : Vector2 | ||
sr | SpriteRenderer | |
return | Vector2 |
public static HasChild ( RectTransform trans ) : bool | ||
trans | RectTransform | |
return | bool |
public static HasChild ( Transform trans ) : bool | ||
trans | Transform | |
return | bool |
public static IncVec3 ( Vector3 val, float x, float y, float z ) : Vector3 | ||
val | Vector3 | |
x | float | |
y | float | |
z | float | |
return | Vector3 |
public static IncVecX ( Vector3 val, float x ) : Vector3 | ||
val | Vector3 | |
x | float | |
return | Vector3 |
public static IncVecY ( Vector3 val, float y ) : Vector3 | ||
val | Vector3 | |
y | float | |
return | Vector3 |
public static IncVecZ ( Vector3 val, float z ) : Vector3 | ||
val | Vector3 | |
z | float | |
return | Vector3 |
public static IsArrayEmpty ( Array list ) : bool | ||
list | Array | |
return | bool |
public static IsNumberString ( string str ) : bool | ||
str | string | |
return | bool |
public static IsSameTribe ( JCS_2DLiveObject liveObj1, JCS_2DLiveObject liveObj2 ) : bool | ||
liveObj1 | JCS_2DLiveObject | obj one |
liveObj2 | JCS_2DLiveObject | obj two |
return | bool |
public static IsScene ( string name ) : bool | ||
name | string | Name of the scene. |
return | bool |
public static LastFileIndex ( string path, string prefixStr, string ext ) : int | ||
path | string | path to search index. |
prefixStr | string | Filen name prefix. |
ext | string | Filen name extension. |
return | int |
public static LoopInArray ( int index, Array arr ) : int | ||
index | int | Index |
arr | Array | Array. |
return | int |
public static LoopInArray ( int index, List arr ) : int | ||
index | int | Index |
arr | List | List. |
return | int |
public static MergeArrays2 ( Array arr1, Array arr2 ) : T[] | ||
arr1 | Array | First array. |
arr2 | Array | Second array. |
return | T[] |
public static MouseOverGUI ( RectTransform imageRect, RectTransform rootPanel = null ) : bool | ||
imageRect | RectTransform | |
rootPanel | RectTransform | |
return | bool |
public static MoveToTheLastChild ( Transform trans ) : void | ||
trans | Transform | |
return | void |
public static ReattachSelf ( RectTransform trans, ReattachCallback callback ) : void | ||
trans | RectTransform | |
callback | ReattachCallback | |
return | void |
public static ReattachSelf ( Transform trans, ReattachCallback callback ) : void | ||
trans | Transform | Transform you want to detach and reattach after callback. |
callback | ReattachCallback | Callback after detach and before reattach. |
return | void |
public static RemoveEmptySlot ( List inList ) : List |
||
inList | List | |
return | List |
public static RemoveEmptySlot ( Array inArray ) : T[] | ||
inArray | Array | Array list. |
return | T[] |
public static RemoveEmptySlotIncludeMissing ( List inList ) : List |
||
inList | List | |
return | List |
public static RemoveEmptySlotIncludeMissing ( Array inArray ) : T[] | ||
inArray | Array | |
return | T[] |
public static SetActiveToAllChildren ( Transform trans, bool act ) : void | ||
trans | Transform | transform to do the effect. |
act | bool | action to the effect |
return | void |
public static SetEnableAllComponents ( Transform trans, bool act ) : void | ||
trans | Transform | transform to apply the effect. |
act | bool | enable or disable? |
return | void |
public static SetParentWithoutLosingInfo ( Transform trans, Transform parent ) : void | ||
trans | Transform | transform to set to parent transform |
parent | Transform | parent transform |
return | void |
public static SetVec3 ( Vector3 &val, float x, float y, float z ) : Vector3 | ||
val | Vector3 | |
x | float | |
y | float | |
z | float | |
return | Vector3 |
public static SetVecX ( Vector3 &val, float x ) : Vector3 | ||
val | Vector3 | |
x | float | |
return | Vector3 |
public static SetVecY ( Vector3 &val, float y ) : Vector3 | ||
val | Vector3 | |
y | float | |
return | Vector3 |
public static SetVecZ ( Vector3 &val, float z ) : Vector3 | ||
val | Vector3 | |
z | float | |
return | Vector3 |
public static SpawnAnimateObject ( RuntimeAnimatorController anim, int orderLayer = 15 ) : GameObject | ||
anim | RuntimeAnimatorController | anim assign |
orderLayer | int | sorting order |
return | GameObject |
public static SpawnAnimateObjectDeathEvent ( RuntimeAnimatorController anim, int orderLayer = 15, int loopTimes = 1 ) : GameObject | ||
anim | RuntimeAnimatorController | animation u want to play |
orderLayer | int | sorting order |
loopTimes | int | loop times |
return | GameObject |
public static SpawnGameObject ( string objectPath, Vector3 position = newVector3(), Quaternion rotation = newQuaternion() ) : GameObject | ||
objectPath | string | path of the game object |
position | Vector3 | position of the game object spawn |
rotation | Quaternion | rotation of the game object spawn |
return | GameObject |
public static SpawnGameObject ( |
||
trans | ||
position | Vector3 | |
rotation | Quaternion | |
return |
public static StringToBytes ( string data, JCS_CharsetType charset ) : byte[] | ||
data | string | String data to convert to byte array. |
charset | JCS_CharsetType | Target charset type. |
return | byte[] |
public static ToJson ( obj ) : string | ||
obj | Object that are serializable. | |
return | string |
public static VectorDirection ( JCS_Vector3Direction direction ) : Vector3 | ||
direction | JCS_Vector3Direction | direction u wants. |
return | Vector3 |
public static WithInAcceptRange ( float range, float acceptRange, float currentVal ) : bool | ||
range | float | |
acceptRange | float | |
currentVal | float | |
return | bool |
public static WithInArrayRange ( int index, Array arr ) : bool | ||
index | int | |
arr | Array | |
return | bool |
public static WithInArrayRange ( int index, List arr ) : bool | ||
index | int | |
arr | List | |
return | bool |
public static WithInRange ( float minRange, float maxRange, float currentVal ) : bool | ||
minRange | float | |
maxRange | float | |
currentVal | float | |
return | bool |