Esempio n. 1
0
        protected void DrawVisualObject(VisualObject vo, GUIContent gContent)
        {
            vo.obj = (GameObject)EditorGUILayout.ObjectField(gContent, vo.obj, typeof(GameObject), true);

            cont = new GUIContent(" - Auto Destroy:", "Check if the spawned effect should be destroyed automatically");
            if (vo.obj != null)
            {
                vo.autoDestroy = EditorGUILayout.Toggle(cont, vo.autoDestroy);
            }
            else
            {
                EditorGUILayout.LabelField(" - Auto Destroy:", "-");
            }

            cont = new GUIContent(" - Effect Duration:", "How long before the spawned effect object is destroyed");
            if (vo.obj != null && vo.autoDestroy)
            {
                vo.duration = EditorGUILayout.FloatField(cont, vo.duration);
            }
            else
            {
                EditorGUILayout.LabelField(" - Effect Duration:", "-");
            }
        }