Renders a billboard.

Inheritance: Renderer
 /// <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.BillboardRenderer billboardRenderer = (UnityEngine.BillboardRenderer)value;
     writer.WriteProperty("billboard", billboardRenderer.billboard);
     writer.WriteProperty("enabled", billboardRenderer.enabled);
     writer.WriteProperty("shadowCastingMode", billboardRenderer.shadowCastingMode);
     writer.WriteProperty("receiveShadows", billboardRenderer.receiveShadows);
     writer.WriteProperty("material", billboardRenderer.material);
     writer.WriteProperty("sharedMaterial", billboardRenderer.sharedMaterial);
     writer.WriteProperty("materials", billboardRenderer.materials);
     writer.WriteProperty("sharedMaterials", billboardRenderer.sharedMaterials);
     writer.WriteProperty("lightmapIndex", billboardRenderer.lightmapIndex);
     writer.WriteProperty("realtimeLightmapIndex", billboardRenderer.realtimeLightmapIndex);
     writer.WriteProperty("lightmapScaleOffset", billboardRenderer.lightmapScaleOffset);
     writer.WriteProperty("motionVectorGenerationMode", billboardRenderer.motionVectorGenerationMode);
     writer.WriteProperty("realtimeLightmapScaleOffset", billboardRenderer.realtimeLightmapScaleOffset);
     writer.WriteProperty("lightProbeUsage", billboardRenderer.lightProbeUsage);
     writer.WriteProperty("lightProbeProxyVolumeOverride", billboardRenderer.lightProbeProxyVolumeOverride);
     writer.WriteProperty("probeAnchor", billboardRenderer.probeAnchor);
     writer.WriteProperty("reflectionProbeUsage", billboardRenderer.reflectionProbeUsage);
     writer.WriteProperty("sortingLayerName", billboardRenderer.sortingLayerName);
     writer.WriteProperty("sortingLayerID", billboardRenderer.sortingLayerID);
     writer.WriteProperty("sortingOrder", billboardRenderer.sortingOrder);
     writer.WriteProperty("tag", billboardRenderer.tag);
     writer.WriteProperty("name", billboardRenderer.name);
     writer.WriteProperty("hideFlags", billboardRenderer.hideFlags);
 }
 static public int get_billboard(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         UnityEngine.BillboardRenderer self = (UnityEngine.BillboardRenderer)checkSelf(l);
         pushValue(l, true);
         pushValue(l, self.billboard);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }
 static public int get_billboard(IntPtr l)
 {
     try {
         UnityEngine.BillboardRenderer self = (UnityEngine.BillboardRenderer)checkSelf(l);
         pushValue(l, self.billboard);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int constructor(IntPtr l)
 {
     try {
         UnityEngine.BillboardRenderer o;
         o = new UnityEngine.BillboardRenderer();
         pushValue(l, o);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
	static public int constructor(IntPtr l) {
		try {
			UnityEngine.BillboardRenderer o;
			o=new UnityEngine.BillboardRenderer();
			pushValue(l,true);
			pushValue(l,o);
			return 2;
		}
		catch(Exception e) {
			return error(l,e);
		}
	}
 static public int set_billboard(IntPtr l)
 {
     try {
         UnityEngine.BillboardRenderer self = (UnityEngine.BillboardRenderer)checkSelf(l);
         UnityEngine.BillboardAsset    v;
         checkType(l, 2, out v);
         self.billboard = v;
         return(0);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 public static int constructor(IntPtr l)
 {
     try {
         UnityEngine.BillboardRenderer o;
         o=new UnityEngine.BillboardRenderer();
         pushValue(l,o);
         return 1;
     }
     catch(Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return 0;
     }
 }
Exemple #8
0
 static public int constructor(IntPtr l)
 {
     try {
         UnityEngine.BillboardRenderer o;
         o = new UnityEngine.BillboardRenderer();
         pushValue(l, o);
         return(1);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
// fields

// properties
    static void BillboardRenderer_billboard(JSVCall vc)
    {
        if (vc.bGet)
        {
            UnityEngine.BillboardRenderer _this = (UnityEngine.BillboardRenderer)vc.csObj;
            var result = _this.billboard;
            JSMgr.datax.setObject((int)JSApi.SetType.Rval, result);
        }
        else
        {
            UnityEngine.BillboardAsset    arg0  = (UnityEngine.BillboardAsset)JSMgr.datax.getObject((int)JSApi.GetType.Arg);
            UnityEngine.BillboardRenderer _this = (UnityEngine.BillboardRenderer)vc.csObj;
            _this.billboard = arg0;
        }
    }
        /// <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.BillboardRenderer billboardRenderer = (UnityEngine.BillboardRenderer)value;
            foreach (string property in reader.Properties)
            {
                switch (property)
                {
                case "billboard":
                    if (billboardRenderer.billboard == null)
                    {
                        billboardRenderer.billboard = reader.ReadProperty <UnityEngine.BillboardAsset> ();
                    }
                    else
                    {
                        reader.ReadIntoProperty <UnityEngine.BillboardAsset> (billboardRenderer.billboard);
                    }
                    break;

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

                case "shadowCastingMode":
                    billboardRenderer.shadowCastingMode = reader.ReadProperty <UnityEngine.Rendering.ShadowCastingMode> ();
                    break;

                case "receiveShadows":
                    billboardRenderer.receiveShadows = reader.ReadProperty <System.Boolean> ();
                    break;

                case "material":
                    if (billboardRenderer.material == null)
                    {
                        billboardRenderer.material = reader.ReadProperty <UnityEngine.Material> ();
                    }
                    else
                    {
                        reader.ReadIntoProperty <UnityEngine.Material> (billboardRenderer.material);
                    }
                    break;

                case "sharedMaterial":
                    if (billboardRenderer.sharedMaterial == null)
                    {
                        billboardRenderer.sharedMaterial = reader.ReadProperty <UnityEngine.Material> ();
                    }
                    else
                    {
                        reader.ReadIntoProperty <UnityEngine.Material> (billboardRenderer.sharedMaterial);
                    }
                    break;

                case "materials":
                    billboardRenderer.materials = reader.ReadProperty <UnityEngine.Material[]> ();
                    break;

                case "sharedMaterials":
                    billboardRenderer.sharedMaterials = reader.ReadProperty <UnityEngine.Material[]> ();
                    break;

                case "lightmapIndex":
                    billboardRenderer.lightmapIndex = reader.ReadProperty <System.Int32> ();
                    break;

                case "realtimeLightmapIndex":
                    billboardRenderer.realtimeLightmapIndex = reader.ReadProperty <System.Int32> ();
                    break;

                case "lightmapScaleOffset":
                    billboardRenderer.lightmapScaleOffset = reader.ReadProperty <UnityEngine.Vector4> ();
                    break;

                case "motionVectorGenerationMode":
                    billboardRenderer.motionVectorGenerationMode = reader.ReadProperty <UnityEngine.MotionVectorGenerationMode> ();
                    break;

                case "realtimeLightmapScaleOffset":
                    billboardRenderer.realtimeLightmapScaleOffset = reader.ReadProperty <UnityEngine.Vector4> ();
                    break;

                case "lightProbeUsage":
                    billboardRenderer.lightProbeUsage = reader.ReadProperty <UnityEngine.Rendering.LightProbeUsage> ();
                    break;

                case "lightProbeProxyVolumeOverride":
                    if (billboardRenderer.lightProbeProxyVolumeOverride == null)
                    {
                        billboardRenderer.lightProbeProxyVolumeOverride = reader.ReadProperty <UnityEngine.GameObject> ();
                    }
                    else
                    {
                        reader.ReadIntoProperty <UnityEngine.GameObject> (billboardRenderer.lightProbeProxyVolumeOverride);
                    }
                    break;

                case "probeAnchor":
                    if (billboardRenderer.probeAnchor == null)
                    {
                        billboardRenderer.probeAnchor = reader.ReadProperty <UnityEngine.Transform> ();
                    }
                    else
                    {
                        reader.ReadIntoProperty <UnityEngine.Transform> (billboardRenderer.probeAnchor);
                    }
                    break;

                case "reflectionProbeUsage":
                    billboardRenderer.reflectionProbeUsage = reader.ReadProperty <UnityEngine.Rendering.ReflectionProbeUsage> ();
                    break;

                case "sortingLayerName":
                    billboardRenderer.sortingLayerName = reader.ReadProperty <System.String> ();
                    break;

                case "sortingLayerID":
                    billboardRenderer.sortingLayerID = reader.ReadProperty <System.Int32> ();
                    break;

                case "sortingOrder":
                    billboardRenderer.sortingOrder = reader.ReadProperty <System.Int32> ();
                    break;

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

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

                case "hideFlags":
                    billboardRenderer.hideFlags = reader.ReadProperty <UnityEngine.HideFlags> ();
                    break;
                }
            }
        }
 /// <summary>
 /// Read the data using the reader.
 /// </summary>
 /// <param name="reader">Reader.</param>
 public override object Read(ISaveGameReader reader)
 {
     UnityEngine.BillboardRenderer billboardRenderer = SaveGameType.CreateComponent <UnityEngine.BillboardRenderer> ();
     ReadInto(billboardRenderer, reader);
     return(billboardRenderer);
 }
    static int _CreateBillboardRenderer(IntPtr L)
    {
        int count = LuaDLL.lua_gettop(L);

        if (count == 0)
        {
            BillboardRenderer obj = new BillboardRenderer();
            LuaScriptMgr.Push(L, obj);
            return 1;
        }
        else
        {
            LuaDLL.luaL_error(L, "invalid arguments to method: BillboardRenderer.New");
        }

        return 0;
    }