CreateStudioEvent() public static method

public static CreateStudioEvent ( string eventPath, string eventName ) : string
eventPath string
eventName string
return string
Exemplo n.º 1
0
        private void CreateEventInStudio()
        {
            string eventGuid = EditorUtils.CreateStudioEvent(eventFolder, eventName);

            if (!string.IsNullOrEmpty(eventGuid))
            {
                EditorUtils.GetScriptOutput(String.Format("studio.project.lookup(\"{0}\").relationships.banks.add(studio.project.lookup(\"{1}\"));", eventGuid, banks[selectedBank].guid));
                EditorUtils.GetScriptOutput("studio.project.build();");

                string fullPath = "event:" + eventFolder + eventName;
                outputProperty.stringValue = fullPath;
                EditorUtils.UpdateParamsOnEmitter(outputProperty.serializedObject, fullPath);
                outputProperty.serializedObject.ApplyModifiedProperties();
            }
        }