Ejemplo n.º 1
0
        public string getScripableObjectPath(eScriptableObject type)
        {
            int index = (int)type;

            if (Paths.IsContainIndex(index))
            {
                return(Paths[index]);
            }

            Debug.LogError("Path not contain, eScriptableObject is " + type.ToString());
            return(string.Empty);
        }
Ejemplo n.º 2
0
        public ScriptableObject LoadScriptableObject(eScriptableObject type)
        {
            string path = ScriptableObjectTable.getScripableObjectPath(type);

            ScriptableObject so = Resources.Load(path) as ScriptableObject;

            if (so == null)
            {
                Debug.LogError("Error ScriptableObjectPath, eScriptableObject is " + type.ToString() + ", Path is " + path);
            }

            return(so);
        }