Exemplo n.º 1
0
 static int get_transform(IntPtr L)
 {
     if (LuaAPI.IsObject(L, 1))
     {
         UnityEngine.GameObject go = LuaAPI.ToObj <GameObject>(L, 1);
         LuaAPI.PushObj(L, go.transform);
     }
     return(1);
 }
Exemplo n.º 2
0
 void PushToLua(Type type, object arg)
 {
     if (type == typeof(int))
     {
         LuaAPI.PushNumber(LuaEnv.L, (int)arg);
     }
     else if (type == typeof(UnityEngine.Object))
     {
         LuaAPI.PushObj(LuaEnv.L, (UnityEngine.Object)arg);
     }
 }
Exemplo n.º 3
0
 public static int Find(IntPtr L)
 {
     if (CheckArgsCount(L, 1))
     {
         if (LuaAPI.IsString(L, 1))
         {
             string arg0 = LuaAPI.ToStr(L, 1);
             UnityEngine.GameObject o = UnityEngine.GameObject.Find(arg0);
             LuaAPI.PushObj(L, o);
         }
     }
     return(1);
 }