Allows to control the dynamic Global Illumination.

コード例 #1
0
 static public int constructor(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.DynamicGI o;
         o = new UnityEngine.DynamicGI();
         pushValue(l, true);
         pushValue(l, o);
         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
 }
コード例 #2
0
	static public int constructor(IntPtr l) {
		try {
			UnityEngine.DynamicGI o;
			o=new UnityEngine.DynamicGI();
			pushValue(l,true);
			pushValue(l,o);
			return 2;
		}
		catch(Exception e) {
			return error(l,e);
		}
	}
コード例 #3
0
ファイル: DynamicGI.cs プロジェクト: zhkuang/UnityDecompiled
 public static void UpdateMaterials(Terrain terrain)
 {
     if (terrain == null)
     {
         throw new ArgumentNullException("terrain");
     }
     if (terrain.terrainData == null)
     {
         throw new ArgumentException("Invalid terrainData.");
     }
     DynamicGI.UpdateMaterialsForTerrain(terrain, new Rect(0f, 0f, 1f, 1f));
 }
コード例 #4
0
 static public int constructor(IntPtr l)
 {
     try {
         UnityEngine.DynamicGI o;
         o = new UnityEngine.DynamicGI();
         pushValue(l, true);
         pushValue(l, o);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
コード例 #5
0
 static public int constructor(IntPtr l)
 {
     try {
         UnityEngine.DynamicGI o;
         o = new UnityEngine.DynamicGI();
         pushValue(l, o);
         return(1);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
コード例 #6
0
 public static int constructor(IntPtr l)
 {
     try {
         UnityEngine.DynamicGI o;
         o=new UnityEngine.DynamicGI();
         pushValue(l,o);
         return 1;
     }
     catch(Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return 0;
     }
 }
コード例 #7
0
ファイル: DynamicGI.cs プロジェクト: zhkuang/UnityDecompiled
        public static void UpdateMaterials(Terrain terrain, int x, int y, int width, int height)
        {
            if (terrain == null)
            {
                throw new ArgumentNullException("terrain");
            }
            if (terrain.terrainData == null)
            {
                throw new ArgumentException("Invalid terrainData.");
            }
            float num  = (float)terrain.terrainData.alphamapWidth;
            float num2 = (float)terrain.terrainData.alphamapHeight;

            DynamicGI.UpdateMaterialsForTerrain(terrain, new Rect((float)x / num, (float)y / num2, (float)width / num, (float)height / num2));
        }
コード例 #8
0
 public static void SetEmissive(Renderer renderer, Color color)
 {
     DynamicGI.INTERNAL_CALL_SetEmissive(renderer, ref color);
 }
コード例 #9
0
ファイル: DynamicGI.cs プロジェクト: zhkuang/UnityDecompiled
 internal static void UpdateMaterialsForTerrain(Terrain terrain, Rect uvBounds)
 {
     DynamicGI.INTERNAL_CALL_UpdateMaterialsForTerrain(terrain, ref uvBounds);
 }
コード例 #10
0
ファイル: DynamicGI.cs プロジェクト: zhkuang/UnityDecompiled
 public static void UpdateMaterials(Renderer renderer)
 {
     DynamicGI.UpdateMaterialsForRenderer(renderer);
 }
コード例 #11
0
 public static void SetEmissive(Renderer renderer, Color color)
 {
     DynamicGI.SetEmissive_Injected(renderer, ref color);
 }
コード例 #12
0
    static int _CreateDynamicGI(IntPtr L)
    {
        int count = LuaDLL.lua_gettop(L);

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

        return 0;
    }