C# 클래스 Hugula.Utils.LuaHelper

파일 보기 프로젝트 열기: tenvick/hugula 1 사용 예제들

공개 메소드들

메소드 설명
AddComponent ( GameObject obj, System t ) : Component
AddComponent ( GameObject obj, string className ) : Component
Destroy ( Object original ) : void

Destroy object

Destroy ( Object original, float t ) : void
DestroyImmediate ( Object original ) : void
DestroyImmediate ( Object original, bool allowDestroyingAssets ) : void
Find ( string name ) : GameObject

寻找GAMEOBJECT

FindWithTag ( string tag ) : GameObject

ForeachChild ( GameObject parent, LuaFunction eachFn ) : void

GCCollect ( ) : void

调用GC.Collect

GetAllChild ( GameObject obj ) : UnityEngine.Transform[]

GetAngle ( float p1x, float p1y, float p2x, float p2y ) : float

得到两个点之间的夹角

GetBytes ( string utf8Str ) : byte[]

获取bytes

GetClassType ( string classname ) : System.Type

getType

GetComponent ( GameObject obj, System t ) : Component
GetComponent ( GameObject obj, string classname ) : Component

GetComponentInChildren ( GameObject obj, System t ) : Component
GetComponentInChildren ( GameObject obj, string classname ) : Component

GetComponentInChildren

GetComponents ( GameObject obj, System t ) : UnityEngine.Component[]
GetComponents ( GameObject obj, string classname ) : UnityEngine.Component[]

GetComponentsInChildren ( GameObject obj, System t ) : UnityEngine.Component[]
GetComponentsInChildren ( GameObject obj, string classname ) : UnityEngine.Component[]

GetLayerMask ( string args ) : int

the Layersmask

GetUTF8String ( System bytes ) : string

获取utf8字符串

Instantiate ( Object original ) : Object

Instantiate Object

InstantiateGlobal ( GameObject original, GameObject parent = null ) : GameObject

InstantiateLocal ( GameObject original ) : GameObject
InstantiateLocal ( GameObject original, GameObject parent ) : GameObject

InstantiateLocal ( GameObject original, GameObject parent, Vector3 pos ) : GameObject
InstantiateLocal ( GameObject original, Vector3 pos ) : GameObject
LoadFromMemory ( System bytes ) : AssetBundle

Creates from byte array.

LoadScene ( string sceneName, bool isAdditive ) : void

Loads the scene.

PlayAnimation ( Animation anim, string name, AnimationDirection dir ) : AnimationState

播放动画片段

PlayAnimator ( Animator anim, string name, AnimationDirection dir ) : AnimatorStateInfo

播放动画片段

Raycast ( Ray ray ) : object

Raycast the specified ray.

RefreshShader ( AssetBundle assetBundle ) : void

/// 得到类型 ///

刷新shader

RefreshShader ( GameObject obj ) : void
ReleaseLuaFn ( LuaFunction fn ) : void
RemoveComponent ( Component comp ) : void
RemoveComponent ( GameObject obj, string className ) : void
SetLayer ( Transform transform, int layer ) : void

Sets the layer.

SetParent ( GameObject child, GameObject parent ) : void

设置父对象

StringToHash ( string str ) : int

str 转换为hash code

UnloadScene ( string sceneName ) : void

卸载场景

메소드 상세

AddComponent() 공개 정적인 메소드

public static AddComponent ( GameObject obj, System t ) : Component
obj UnityEngine.GameObject
t System
리턴 UnityEngine.Component

AddComponent() 공개 정적인 메소드

public static AddComponent ( GameObject obj, string className ) : Component
obj UnityEngine.GameObject
className string
리턴 UnityEngine.Component

Destroy() 공개 정적인 메소드

Destroy object
public static Destroy ( Object original ) : void
original Object
리턴 void

Destroy() 공개 정적인 메소드

public static Destroy ( Object original, float t ) : void
original Object
t float
리턴 void

DestroyImmediate() 공개 정적인 메소드

public static DestroyImmediate ( Object original ) : void
original Object
리턴 void

DestroyImmediate() 공개 정적인 메소드

public static DestroyImmediate ( Object original, bool allowDestroyingAssets ) : void
original Object
allowDestroyingAssets bool
리턴 void

Find() 공개 정적인 메소드

寻找GAMEOBJECT
public static Find ( string name ) : GameObject
name string
리턴 UnityEngine.GameObject

FindWithTag() 공개 정적인 메소드

public static FindWithTag ( string tag ) : GameObject
tag string
리턴 UnityEngine.GameObject

ForeachChild() 공개 정적인 메소드

public static ForeachChild ( GameObject parent, LuaFunction eachFn ) : void
parent UnityEngine.GameObject
eachFn SLua.LuaFunction
리턴 void

GCCollect() 공개 정적인 메소드

调用GC.Collect
public static GCCollect ( ) : void
리턴 void

GetAllChild() 공개 정적인 메소드

public static GetAllChild ( GameObject obj ) : UnityEngine.Transform[]
obj UnityEngine.GameObject
리턴 UnityEngine.Transform[]

GetAngle() 공개 정적인 메소드

得到两个点之间的夹角
public static GetAngle ( float p1x, float p1y, float p2x, float p2y ) : float
p1x float
p1y float
p2x float
p2y float
리턴 float

GetBytes() 공개 정적인 메소드

获取bytes
public static GetBytes ( string utf8Str ) : byte[]
utf8Str string
리턴 byte[]

GetClassType() 공개 정적인 메소드

getType
public static GetClassType ( string classname ) : System.Type
classname string
리턴 System.Type

GetComponent() 공개 정적인 메소드

public static GetComponent ( GameObject obj, System t ) : Component
obj UnityEngine.GameObject
t System
리턴 UnityEngine.Component

GetComponent() 공개 정적인 메소드

public static GetComponent ( GameObject obj, string classname ) : Component
obj UnityEngine.GameObject
classname string
리턴 UnityEngine.Component

GetComponentInChildren() 공개 정적인 메소드

public static GetComponentInChildren ( GameObject obj, System t ) : Component
obj UnityEngine.GameObject
t System
리턴 UnityEngine.Component

GetComponentInChildren() 공개 정적인 메소드

GetComponentInChildren
public static GetComponentInChildren ( GameObject obj, string classname ) : Component
obj UnityEngine.GameObject
classname string
리턴 UnityEngine.Component

GetComponents() 공개 정적인 메소드

public static GetComponents ( GameObject obj, System t ) : UnityEngine.Component[]
obj UnityEngine.GameObject
t System
리턴 UnityEngine.Component[]

GetComponents() 공개 정적인 메소드

public static GetComponents ( GameObject obj, string classname ) : UnityEngine.Component[]
obj UnityEngine.GameObject
classname string
리턴 UnityEngine.Component[]

GetComponentsInChildren() 공개 정적인 메소드

public static GetComponentsInChildren ( GameObject obj, System t ) : UnityEngine.Component[]
obj UnityEngine.GameObject
t System
리턴 UnityEngine.Component[]

GetComponentsInChildren() 공개 정적인 메소드

public static GetComponentsInChildren ( GameObject obj, string classname ) : UnityEngine.Component[]
obj UnityEngine.GameObject
classname string
리턴 UnityEngine.Component[]

GetLayerMask() 공개 정적인 메소드

the Layersmask
public static GetLayerMask ( string args ) : int
args string Arguments.
리턴 int

GetUTF8String() 공개 정적인 메소드

获取utf8字符串
public static GetUTF8String ( System bytes ) : string
bytes System
리턴 string

Instantiate() 공개 정적인 메소드

Instantiate Object
public static Instantiate ( Object original ) : Object
original Object
리턴 Object

InstantiateGlobal() 공개 정적인 메소드

public static InstantiateGlobal ( GameObject original, GameObject parent = null ) : GameObject
original UnityEngine.GameObject
parent UnityEngine.GameObject
리턴 UnityEngine.GameObject

InstantiateLocal() 공개 정적인 메소드

public static InstantiateLocal ( GameObject original ) : GameObject
original UnityEngine.GameObject
리턴 UnityEngine.GameObject

InstantiateLocal() 공개 정적인 메소드

public static InstantiateLocal ( GameObject original, GameObject parent ) : GameObject
original UnityEngine.GameObject
parent UnityEngine.GameObject
리턴 UnityEngine.GameObject

InstantiateLocal() 공개 정적인 메소드

public static InstantiateLocal ( GameObject original, GameObject parent, Vector3 pos ) : GameObject
original UnityEngine.GameObject
parent UnityEngine.GameObject
pos UnityEngine.Vector3
리턴 UnityEngine.GameObject

InstantiateLocal() 공개 정적인 메소드

public static InstantiateLocal ( GameObject original, Vector3 pos ) : GameObject
original UnityEngine.GameObject
pos UnityEngine.Vector3
리턴 UnityEngine.GameObject

LoadFromMemory() 공개 정적인 메소드

Creates from byte array.
public static LoadFromMemory ( System bytes ) : AssetBundle
bytes System Bytes.
리턴 UnityEngine.AssetBundle

LoadScene() 공개 정적인 메소드

Loads the scene.
public static LoadScene ( string sceneName, bool isAdditive ) : void
sceneName string Scene name.
isAdditive bool If set to true is additive.
리턴 void

PlayAnimation() 공개 정적인 메소드

播放动画片段
public static PlayAnimation ( Animation anim, string name, AnimationDirection dir ) : AnimationState
anim UnityEngine.Animation
name string
dir AnimationDirection
리턴 UnityEngine.AnimationState

PlayAnimator() 공개 정적인 메소드

播放动画片段
public static PlayAnimator ( Animator anim, string name, AnimationDirection dir ) : AnimatorStateInfo
anim UnityEngine.Animator
name string
dir AnimationDirection
리턴 UnityEngine.AnimatorStateInfo

Raycast() 공개 정적인 메소드

Raycast the specified ray.
public static Raycast ( Ray ray ) : object
ray UnityEngine.Ray Ray.
리턴 object

RefreshShader() 공개 정적인 메소드

/// 得到类型 /// 刷新shader
public static RefreshShader ( AssetBundle assetBundle ) : void
assetBundle UnityEngine.AssetBundle
리턴 void

RefreshShader() 공개 정적인 메소드

public static RefreshShader ( GameObject obj ) : void
obj UnityEngine.GameObject
리턴 void

ReleaseLuaFn() 공개 정적인 메소드

public static ReleaseLuaFn ( LuaFunction fn ) : void
fn SLua.LuaFunction
리턴 void

RemoveComponent() 공개 정적인 메소드

public static RemoveComponent ( Component comp ) : void
comp UnityEngine.Component
리턴 void

RemoveComponent() 공개 정적인 메소드

public static RemoveComponent ( GameObject obj, string className ) : void
obj UnityEngine.GameObject
className string
리턴 void

SetLayer() 공개 정적인 메소드

Sets the layer.
public static SetLayer ( Transform transform, int layer ) : void
transform UnityEngine.Transform
layer int Layer.
리턴 void

SetParent() 공개 정적인 메소드

设置父对象
public static SetParent ( GameObject child, GameObject parent ) : void
child UnityEngine.GameObject
parent UnityEngine.GameObject
리턴 void

StringToHash() 공개 정적인 메소드

str 转换为hash code
public static StringToHash ( string str ) : int
str string
리턴 int

UnloadScene() 공개 정적인 메소드

卸载场景
public static UnloadScene ( string sceneName ) : void
sceneName string
리턴 void