Add VRChat and GitHub packages to Unity project
This commit is contained in:
1 parent
0334a52b21
commit
85538aaccc
3297 files changed
+847877
No files matched your search
@@ -0,0 +1,23 @@
|
||||
using System.IO;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace VRC.Udon.Editor
|
||||
{
|
||||
public class UdonImportPostProcessor : AssetPostprocessor
|
||||
{
|
||||
private const string PREFABS_INITIALIZED = "PrefabsInitialized";
|
||||
|
||||
static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths)
|
||||
{
|
||||
// Get key unique to this project, exit early if we've run the function already
|
||||
string key = Path.Combine(Application.dataPath, PREFABS_INITIALIZED);
|
||||
if (EditorPrefs.HasKey(key))
|
||||
return;
|
||||
|
||||
// Function never run for this project - compile and link all prefab programs
|
||||
UdonEditorManager.PopulateAllPrefabSerializedProgramAssetReferences();
|
||||
EditorPrefs.SetBool(key, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user