12345678910111213141516171819202122232425262728293031323334353637 |
- using System.Collections;
- using System.Collections.Generic;
- #if UNITY_EDITOR
- using UnityEditor;
- #endif
- using UnityEngine;
- using XRTool.Util;
- namespace XRTool.WorldUI
- {
- public class PhysicsRayConf : ScriptableObject
- {
- public LayerMask eventMask;
- #if UNITY_EDITOR
- [MenuItem("Assets/Create/DataBase/PhysicsRayConf", false, 0)]
- static void CreateDynamicConf()
- {
- Object obj = Selection.activeObject;
- if (obj)
- {
- string path = AssetDatabase.GetAssetPath(obj);
- PhysicsRayConf bullet = CreateInstance<PhysicsRayConf>();
- if (bullet)
- {
- string confName = UnityUtil.TryGetName<PhysicsRayConf>(path);
- AssetDatabase.CreateAsset(bullet, confName);
- }
- else
- {
- Debug.Log(typeof(PhysicsRayConf) + " is null");
- }
- }
- }
- #endif
- }
- }
|