-<h1 id="jcs_util">JCS_Util</h1><p>All code utility is stored here.<h2 id="functions">Functions</h2><table><thead><tr><th id="name" style="text-align:left">Name<th id="description" style="text-align:left">Description<tbody><tr><td style="text-align:left">Delta<td style="text-align:left">Delta the <code>num</code> with <code>val</code> and clamp the result with <code>min</code> and <code>max</code>.<tr><td style="text-align:left">DeltaP<td style="text-align:left">Delta the <code>num</code> with <code>val</code> by percentage and clamp the result with <code>min</code> and <code>max</code>.<tr><td style="text-align:left">BytesToString<td style="text-align:left">Convert byte array to string by charset type.<tr><td style="text-align:left">StringToBytes<td style="text-align:left">Convert string to byte array by charset type.<tr><td style="text-align:left">EscapeURL<td style="text-align:left">Simple version of escape url.<tr><td style="text-align:left">GetValues<td style="text-align:left">Get the value for each enum, use to loop through the enum.<tr><td style="text-align:left">EnumSize<td style="text-align:left">Returns the length of an enumerator.<tr><td style="text-align:left">WithInRange<td style="text-align:left">Check if the value is within the range.<tr><td style="text-align:left">WithInRange<td style="text-align:left">Check if the index is valid within the collection's size.<tr><td style="text-align:left">CopyBtyeArray<td style="text-align:left">Copy byte array to another byte array memory space.<tr><td style="text-align:left">IsNumberString<td style="text-align:left">Check if the string is a number string.<tr><td style="text-align:left">Parse<td style="text-align:left">Parse <code>str</code> to integer, return <code>defaultValue</code> if failed.<tr><td style="text-align:left">Parse<td style="text-align:left">Parse <code>str</code> to float, return <code>defaultValue</code> if failed.<tr><td style="text-align:left">Parse<td style="text-align:left">Parse <code>str</code> to boolean, return <code>defaultValue</code> if failed.<tr><td style="text-align:left">ToJson<td style="text-align:left">Serialize object to JSON string.<tr><td style="text-align:left">EnableComponent<td style="text-align:left">Do enable/distance component.<tr><td style="text-align:left">ForceGetComponent<td style="text-align:left">Force to get a component, if not found add one new then.<tr><td style="text-align:left">SetActiveToAllChildren<td style="text-align:left">Active all the child in a transform.<tr><td style="text-align:left">MoveToTheLastChild<td style="text-align:left">Make the transform to the last transform of the current parent transform.<tr><td style="text-align:left">SetParentWithoutLosingInfo<td style="text-align:left">Set the transform to another transform without losing it's info. (position, rotation, scale)<tr><td style="text-align:left">SetEnableAllComponents<td style="text-align:left">Set enable/disable to all component on this transform.<tr><td style="text-align:left">DetachChildren<td style="text-align:left">Detach all the child from a transform.<tr><td style="text-align:left">ForceDetachChildren<td style="text-align:left">Force detach all the child from a transform.<tr><td style="text-align:left">AttachChildren<td style="text-align:left">Attach all the childs to this transform.<tr><td style="text-align:left">Instantiate<td style="text-align:left">Spawn a game object.<tr><td style="text-align:left">InstantiateToScene<td style="text-align:left">Spwan a game object to another scene.<tr><td style="text-align:left">WithActiveScene<td style="text-align:left">Execute within the active scene without losing the current scene.<tr><td style="text-align:left">SpawnAnimateObject<td style="text-align:left">Spawn a game object with animation attached.<tr><td style="text-align:left">SpawnAnimateObjectDeathEvent<td style="text-align:left">Spawn a game object with the animator and death event on it.<tr><td style="text-align:left">DestroyAllTypeObjectInScene<td style="text-align:left">Destory all game objects in the scene with the type passed in.<tr><td style="text-align:left">DestroyImmediateAllTypeObjectInScene<td style="text-align:left">Destroy all the game object in the scene immediately with the type passed in.<tr><td style="text-align:left">IsClone<td style="text-align:left">Return true if the object is a clone.<tr><td style="text-align:left">RemoveCloneString<td style="text-align:left">Remove the text "(Clone)" from the object's name, and return the new name string.<tr><td style="text-align:left">FindObjectByType<td style="text-align:left">Retrieves the first active loaded object of Type type.<tr><td style="text-align:left">FindObjectsByType<td style="text-align:left">Retrieves a list of all loaded objects of Type type.<tr><td style="text-align:left">FindGameObjectsWithTag<td style="text-align:left">Return a list of game object with the tag name.<tr><td style="text-align:left">FindCloneObjectsOfTypeAll<td style="text-align:left">Find all cloned game objects in the scene with the type passed in.<tr><td style="text-align:left">FindNotCloneObjectsOfTypeAll<td style="text-align:left">Find all game objects that are not clones in the scene with the type passed in.<tr><td style="text-align:left">FindObjectsOfTypeAllInHierarchy<td style="text-align:left">Find all the game object that are only active in the hierarchy with the type passed in.<tr><td style="text-align:left">GetEasing<td style="text-align:left">Returns the easing function pointer base on the tweener type/enum.<tr><td style="text-align:left">IsScene<td style="text-align:left">Check current scene's with NAME.<tr><td style="text-align:left">IsSceneExists<td style="text-align:left">Returns true if the scene 'name' exists and is in your Build settings, false otherwise.<tr><td style="text-align:left">PlayParticleAtPoint<td style="text-align:left">Play the particle at point.<tr><td style="text-align:left">DestroyParticle<td style="text-align:left">Destroy the particle by its duration.<tr><td style="text-align:left">IsSameTribe<td style="text-align:left">Check if the live object is the same tribe.</table>
0 commit comments