Skip to content

Commit

Permalink
build support
Browse files Browse the repository at this point in the history
  • Loading branch information
nukadelic committed Mar 18, 2020
1 parent 3d73ac4 commit 5ca98df
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 7 deletions.
6 changes: 5 additions & 1 deletion Scripts/Editor/Baker.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using System.Collections.Generic;
#if UNITY_EDITOR

using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
using UnityEngine.SceneManagement;
Expand Down Expand Up @@ -233,3 +235,5 @@ static SceneLightmap SaveSceneLightmap( int lightmap_index, string name )
}
}
}

#endif
6 changes: 5 additions & 1 deletion Scripts/Editor/Editor.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using UnityEngine;
#if UNITY_EDITOR

using UnityEngine;
using UnityEditor;

namespace PrefabLightMapBaker
Expand Down Expand Up @@ -158,3 +160,5 @@ void DrawTextures( Texture2D[] textures, ref Vector2 scroll )
}
}
}

#endif
11 changes: 10 additions & 1 deletion Scripts/Editor/EditorUtils.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using System.Collections.Generic;
#if UNITY_EDITOR

using System.Collections.Generic;
using System.Linq;
using UnityEditor;
using UnityEngine;
Expand Down Expand Up @@ -177,6 +179,11 @@ public static void UpdatePrefab( GameObject prefab )

public static Texture2D SaveLightmapAsset( string copyFrom, string saveTo )
{
if( saveTo.Contains(Application.dataPath) )
{
saveTo.Replace( Application.dataPath, "" );
}

UpdateAsset( copyFrom );
var importer = AssetImporter.GetAtPath( copyFrom ) as TextureImporter;
importer.isReadable = true;
Expand Down Expand Up @@ -279,3 +286,5 @@ public static void Reset( PrefabBaker prefab )
}
}
}

#endif
6 changes: 5 additions & 1 deletion Scripts/Editor/LightmapEditorData.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using System;
#if UNITY_EDITOR

using System;
using System.Linq;
using System.Reflection;
using System.Collections.Generic;
Expand Down Expand Up @@ -65,3 +67,5 @@ public static void SetProfileQuickBake()
}
}
}

#endif
6 changes: 5 additions & 1 deletion Scripts/Editor/PanelComponentsOverride.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using System;
#if UNITY_EDITOR

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
Expand Down Expand Up @@ -56,3 +58,5 @@ public static void Apply( GameObject root )
}
}
}

#endif
7 changes: 5 additions & 2 deletions Scripts/Editor/Window.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

#if UNITY_EDITOR

using System.IO;
using System.Linq;
using System.Collections.Generic;
Expand Down Expand Up @@ -399,4 +400,6 @@ bool FolderGUI()
#endregion
// ----------------------------
}
}
}

#endif

0 comments on commit 5ca98df

Please sign in to comment.