SetLODS() private method

private SetLODS ( LOD lods ) : void
lods LOD
return void
コード例 #1
0
 static public int SetLODS(IntPtr l)
 {
     try{
         UnityEngine.LODGroup self = (UnityEngine.LODGroup)checkSelf(l);
         UnityEngine.LOD[]    a1;
         checkType(l, 2, out a1);
         self.SetLODS(a1);
         return(0);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
コード例 #2
0
 static public int SetLODS(IntPtr l)
 {
     try {
         UnityEngine.LODGroup self = (UnityEngine.LODGroup)checkSelf(l);
         UnityEngine.LOD[]    a1;
         checkType(l, 2, out a1);
         self.SetLODS(a1);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
コード例 #3
0
 void Start() {
     group = gameObject.AddComponent<LODGroup>();
     LOD[] lods = new LOD[4];
     int i = 0;
     while (i < 4)
     {
         PrimitiveType primType = PrimitiveType.Cube;
         if (i == 1) primType = PrimitiveType.Capsule;
         if (i == 2) primType = PrimitiveType.Sphere;
         if (i == 3) primType = PrimitiveType.Cylinder;
         GameObject go = GameObject.CreatePrimitive(primType);
         go.transform.parent = gameObject.transform;
         Renderer[] renderers = new Renderer[1];
         renderers[0] = go.renderer;
         lods[i] = new LOD(1.0F / (i + 1), renderers);
         i++;
     }
     group.SetLODS(lods);
     group.RecalculateBounds();
 }