private void SetVariables() { Name = serializedObject.FindProperty("Name"); Sequences = serializedObject.FindProperty("Sequences"); icon = serializedObject.FindProperty("icon"); id_color = serializedObject.FindProperty("id_color"); character = (DS_Character)target; CreateGUIStyles(); }
private void DrawCharacterField() { EditorGUILayout.BeginHorizontal(); GUILayout.Space(indent * 1.5f); int width = windowwidth - (indent * 3); GUILayoutOption[] options = new GUILayoutOption[] { GUILayout.Width(width), GUILayout.Height(20) }; newCharacter = (DS_Character)EditorGUILayout.ObjectField(newCharacter, typeof(DS_Character), false, options); EditorGUILayout.EndHorizontal(); }
private void SetNodeVariables(SerializedProperty node) { character = node.FindPropertyRelative("character"); sequenceIndex = node.FindPropertyRelative("sequenceIndex"); dialogueIndex = node.FindPropertyRelative("dialogueIndex"); scrollerPos = node.FindPropertyRelative("scrollerPos"); selected = node.FindPropertyRelative("selected"); ScriptableCharacter = new SerializedObject(character.objectReferenceValue); ClassCharacter = (DS_Character)ScriptableCharacter.targetObject; }