コード例 #1
0
        internal static void InvokeTextureChangedCallback(TerrainData terrainData, string textureName, RectInt texelRegion, bool synched)
        {
            bool flag = TerrainCallbacks.textureChanged != null;

            if (flag)
            {
                Terrain[] users = terrainData.users;
                for (int i = 0; i < users.Length; i++)
                {
                    Terrain terrain = users[i];
                    TerrainCallbacks.textureChanged(terrain, textureName, texelRegion, synched);
                }
            }
        }
コード例 #2
0
        internal static void InvokeHeightmapChangedCallback(TerrainData terrainData, RectInt heightRegion, bool synched)
        {
            bool flag = TerrainCallbacks.heightmapChanged != null;

            if (flag)
            {
                Terrain[] users = terrainData.users;
                for (int i = 0; i < users.Length; i++)
                {
                    Terrain terrain = users[i];
                    TerrainCallbacks.heightmapChanged(terrain, heightRegion, synched);
                }
            }
        }