Ejemplo n.º 1
0
        void OnWizardCreate()
        {
            EditorUtility.DisplayDialog("Note", "Please check that the BG Texture is placed at under a \"Resources/\" folder.", "ok");

            if (!System.IO.Directory.Exists("Assets/Actors"))
            {
                AssetDatabase.CreateFolder("Assets", "Actors");
            }

            ActorInfo actor = ScriptableObjectUtility.CreateScriptableObject("ActorInfo", "Assets/Actors/" + actorName + ".asset") as ActorInfo;

            ActorUtility.SetUpActorInfo(actor, actorName, sizeInPercent, textColor, textures);
            EditorGUIUtility.PingObject(actor);
        }
Ejemplo n.º 2
0
        // Test Define character.
        void defineactor(Hashtable param)
        {
            string actorName = param["name"] as string;
//			string textColorStr = param["textColor"] as string;
            string texturePath   = param["texture"] as string;
            float  sizeInPercent = 100f;

            if (param.ContainsKey("size"))
            {
                sizeInPercent = float.Parse(param["size"] as string);
            }

//			Color textColor = C
            ActorInfo info = ScriptableObject.CreateInstance <ActorInfo>();

            m_ActorMap[actorName] = info;

            string[] texs = new string[1];
            texs[0] = texturePath;              //Resources.Load( texturePath , typeof(Texture2D) ) as Texture2D;
            ActorUtility.SetUpActorInfo(info, actorName, sizeInPercent, Color.cyan, texs);
        }