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(); if (bullet) { string confName = UnityUtil.TryGetName(path); AssetDatabase.CreateAsset(bullet, confName); } else { Debug.Log(typeof(PhysicsRayConf) + " is null"); } } } #endif } }