Skip to content

Commit

Permalink
Merge pull request #328 from epiplon-game-studio/master
Browse files Browse the repository at this point in the history
Fixes a reference error bug with play mode
  • Loading branch information
LogicalError authored Jan 25, 2022
2 parents 074586c + e5beb7e commit 438d6a9
Show file tree
Hide file tree
Showing 5 changed files with 371 additions and 349 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,13 @@ static void InitializeDefaultCSGModel(Scene currentScene, CSGSceneState sceneSta
bool inPrefabMode = false;
Transform prefabRootTransform = null;
#if UNITY_2018_3_OR_NEWER

#if UNITY_2021_2_OR_NEWER
var currentPrefabStage = UnityEditor.SceneManagement.PrefabStageUtility.GetCurrentPrefabStage();
#else
var currentPrefabStage = UnityEditor.Experimental.SceneManagement.PrefabStageUtility.GetCurrentPrefabStage();
#endif

if (currentPrefabStage != null)
{
var prefabRoot = currentPrefabStage.prefabContentsRoot;
Expand Down
Loading

0 comments on commit 438d6a9

Please sign in to comment.