Skip to content

Commit

Permalink
🐛 fix(multi-text-loader): Load on Start on Editor
Browse files Browse the repository at this point in the history
  • Loading branch information
esnya committed Feb 5, 2023
1 parent b2dc6d5 commit 34160f3
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ public class MultiTextLoader : MonoBehaviour
public string textPath;

#if UNITY_EDITOR
private void Start()
{
Load();
}

private void Load()
{
var textAssets = AssetDatabase
Expand All @@ -41,13 +46,6 @@ private static void LoadAllInScene()
}
}

[InitializeOnLoadMethod]
public static void Initialize()
{
EditorApplication.playModeStateChanged += (state) => {
if (state == PlayModeStateChange.EnteredPlayMode) LoadAllInScene();
};
}

public class BuildCallback : Editor, IVRCSDKBuildRequestedCallback
{
Expand Down

0 comments on commit 34160f3

Please sign in to comment.