You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
573 B

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
public static class CreateUCEventSystem
{
[MenuItem("GameObject/UC/UC Event System",false , 0)]
private static void CreateUceventSystem()
{
GameObject temp = AssetDatabase.LoadAssetAtPath("Assets/UC/TUIO/UCEventSystem.prefab", typeof(GameObject)) as GameObject;
if (PrefabUtility.GetPrefabType(temp) == PrefabType.Prefab || PrefabUtility.GetPrefabType(temp) == PrefabType.ModelPrefab)
PrefabUtility.InstantiatePrefab(temp);
}
}