Light Probe Group.

Inheritance: Behaviour
// fields

// properties
    static void LightProbeGroup_probePositions(JSVCall vc)
    {
        if (vc.bGet)
        {
            UnityEngine.LightProbeGroup _this = (UnityEngine.LightProbeGroup)vc.csObj;
            var result = _this.probePositions;
            var arrRet = result;
            for (int i = 0; arrRet != null && i < arrRet.Length; i++)
            {
                JSApi.setVector3S((int)JSApi.SetType.SaveAndTempTrace, arrRet[i]);
                JSApi.moveSaveID2Arr(i);
            }
            JSApi.setArrayS((int)JSApi.SetType.Rval, (arrRet != null ? arrRet.Length : 0), true);
        }
        else
        {
            UnityEngine.Vector3[] arg0 = JSDataExchangeMgr.GetJSArg <UnityEngine.Vector3[]>(() =>
            {
                int jsObjID = JSApi.getObject((int)JSApi.GetType.Arg);
                int length  = JSApi.getArrayLength(jsObjID);
                var ret     = new UnityEngine.Vector3[length];
                for (var i = 0; i < length; i++)
                {
                    JSApi.getElement(jsObjID, i);
                    ret[i] = (UnityEngine.Vector3)JSApi.getVector3S((int)JSApi.GetType.SaveAndRemove);
                }
                return(ret);
            });
            UnityEngine.LightProbeGroup _this = (UnityEngine.LightProbeGroup)vc.csObj;
            _this.probePositions = arg0;
        }
    }
 static public int constructor(IntPtr l)
 {
     UnityEngine.LightProbeGroup o;
     o = new UnityEngine.LightProbeGroup();
     pushObject(l, o);
     return(1);
 }
Example #3
0
        /// <summary>
        /// Read the data into the specified value.
        /// </summary>
        /// <param name="value">Value.</param>
        /// <param name="reader">Reader.</param>
        public override void ReadInto(object value, ISaveGameReader reader)
        {
            UnityEngine.LightProbeGroup lightProbeGroup = (UnityEngine.LightProbeGroup)value;
            foreach (string property in reader.Properties)
            {
                switch (property)
                {
                case "probePositions":
                    lightProbeGroup.probePositions = reader.ReadProperty <UnityEngine.Vector3[]> ();
                    break;

                case "enabled":
                    lightProbeGroup.enabled = reader.ReadProperty <System.Boolean> ();
                    break;

                case "tag":
                    lightProbeGroup.tag = reader.ReadProperty <System.String> ();
                    break;

                case "name":
                    lightProbeGroup.name = reader.ReadProperty <System.String> ();
                    break;

                case "hideFlags":
                    lightProbeGroup.hideFlags = reader.ReadProperty <UnityEngine.HideFlags> ();
                    break;
                }
            }
        }
		public LightProbeGroupEditor(LightProbeGroup group)
		{
			this.m_Group = group;
			this.MarkTetrahedraDirty();
			this.m_SerializedSelectedProbes = ScriptableObject.CreateInstance<LightProbeGroupSelection>();
			this.m_SerializedSelectedProbes.hideFlags = HideFlags.HideAndDontSave;
		}
Example #5
0
 static public int set_probePositions(IntPtr l)
 {
     UnityEngine.LightProbeGroup o = (UnityEngine.LightProbeGroup)checkSelf(l);
     UnityEngine.Vector3[]       v;
     checkType(l, 2, out v);
     o.probePositions = v;
     return(0);
 }
 /// <summary>
 /// Write the specified value using the writer.
 /// </summary>
 /// <param name="value">Value.</param>
 /// <param name="writer">Writer.</param>
 public override void Write(object value, ISaveGameWriter writer)
 {
     UnityEngine.LightProbeGroup lightProbeGroup = (UnityEngine.LightProbeGroup)value;
     writer.WriteProperty("enabled", lightProbeGroup.enabled);
     writer.WriteProperty("tag", lightProbeGroup.tag);
     writer.WriteProperty("name", lightProbeGroup.name);
     writer.WriteProperty("hideFlags", lightProbeGroup.hideFlags);
 }
	static public int constructor(IntPtr l) {
		try {
			UnityEngine.LightProbeGroup o;
			o=new UnityEngine.LightProbeGroup();
			pushValue(l,true);
			pushValue(l,o);
			return 2;
		}
		catch(Exception e) {
			return error(l,e);
		}
	}
Example #8
0
 static public int get_probePositions(IntPtr l)
 {
     try {
         UnityEngine.LightProbeGroup self = (UnityEngine.LightProbeGroup)checkSelf(l);
         pushValue(l, self.probePositions);
         return(1);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
 static public int get_probePositions(IntPtr l)
 {
     try {
         UnityEngine.LightProbeGroup self = (UnityEngine.LightProbeGroup)checkSelf(l);
         pushValue(l, true);
         pushValue(l, self.probePositions);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 public static int constructor(IntPtr l)
 {
     try {
         UnityEngine.LightProbeGroup o;
         o=new UnityEngine.LightProbeGroup();
         pushValue(l,o);
         return 1;
     }
     catch(Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return 0;
     }
 }
Example #11
0
 static public int constructor(IntPtr l)
 {
     LuaDLL.lua_remove(l, 1);
     UnityEngine.LightProbeGroup o;
     if (matchType(l, 1))
     {
         o = new UnityEngine.LightProbeGroup();
         pushObject(l, o);
         return(1);
     }
     LuaDLL.luaL_error(l, "New object failed.");
     return(0);
 }
Example #12
0
 static public int constructor(IntPtr l)
 {
     try {
         UnityEngine.LightProbeGroup o;
         o = new UnityEngine.LightProbeGroup();
         pushValue(l, o);
         return(1);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
 static public int constructor(IntPtr l)
 {
     try {
         UnityEngine.LightProbeGroup o;
         o = new UnityEngine.LightProbeGroup();
         pushValue(l, true);
         pushValue(l, o);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int set_dering(IntPtr l)
 {
     try {
         UnityEngine.LightProbeGroup self = (UnityEngine.LightProbeGroup)checkSelf(l);
         bool v;
         checkType(l, 2, out v);
         self.dering = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Example #15
0
 static public int set_probePositions(IntPtr l)
 {
     try {
         UnityEngine.LightProbeGroup self = (UnityEngine.LightProbeGroup)checkSelf(l);
         UnityEngine.Vector3[]       v;
         checkType(l, 2, out v);
         self.probePositions = v;
         return(0);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
 static public int set_probePositions(IntPtr l)
 {
     try {
         UnityEngine.LightProbeGroup self = (UnityEngine.LightProbeGroup)checkSelf(l);
         UnityEngine.Vector3[]       v;
         checkArray(l, 2, out v);
         self.probePositions = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Example #17
0
 static public int get_probePositions(IntPtr l)
 {
     UnityEngine.LightProbeGroup o = (UnityEngine.LightProbeGroup)checkSelf(l);
     pushValue(l, o.probePositions);
     return(1);
 }
 GameObject LightProbeGrid()
 {
     List<Vector3> position = new List<Vector3>();
     Vector3 layer;
     float interval_axisX = (maxX - minX) / subdivisions_X;
     float interval_axisZ = (maxZ - minZ) / subdivisions_Z;
     for(int x = 0; x <=subdivisions_X; x++){
         for(int z = 0; z <= subdivisions_Z; z++){
             for(int y = 0; y < subdivisions_Y; y++){
                 layer = new Vector3(minX + x * interval_axisX, height[y], minZ + z * interval_axisZ);
                 /*if(Terrain.activeTerrain == null){
                     Debug.Log("场景中没有Terrain");
                     return null;
                 }*/
                 //else{
                 //layer.y = height[y];
                 position.Add(layer);
                 //}
             }
         }
     }
     var go = new GameObject();
     go.name = "lightProbes";
     LPG = go.gameObject.AddComponent<LightProbeGroup>() as LightProbeGroup;
     LPG.probePositions = position.ToArray();
     height = null;
     position = null;
     Debug.Log( "created successfully!,group name:lightProbes" );
     return go;
 }
Example #19
0
 /// <summary>
 /// Read the data using the reader.
 /// </summary>
 /// <param name="reader">Reader.</param>
 public override object Read(ISaveGameReader reader)
 {
     UnityEngine.LightProbeGroup lightProbeGroup = SaveGameType.CreateComponent <UnityEngine.LightProbeGroup> ();
     ReadInto(lightProbeGroup, reader);
     return(lightProbeGroup);
 }