示例#1
0
        public override void DrawCommandGUI()
        {
            base.DrawCommandGUI();

            targetMethod = target as InvokeMethod;

            if (targetMethod == null || targetMethod.targetObject == null)
                return;

            SerializedObject objSerializedTarget = new SerializedObject(targetMethod);

            string component = ShowComponents(objSerializedTarget, targetMethod.targetObject);

            // show component methods if selected
            if (!string.IsNullOrEmpty(component))
            {
                var method = ShowMethods(objSerializedTarget, targetMethod.targetObject, component);

                // show method parameters if selected
                if (method != null)
                {
                    objSerializedTarget.ApplyModifiedProperties();
                    ShowParameters(objSerializedTarget, targetMethod.targetObject, method);
                    ShowReturnValue(objSerializedTarget, method);
                }
            }
        }
示例#2
0
        public override void DrawCommandGUI()
        {
            base.DrawCommandGUI();

            targetMethod = target as InvokeMethod;

            if (targetMethod == null || targetMethod.targetObject == null)
            {
                return;
            }

            SerializedObject objSerializedTarget = new SerializedObject(targetMethod);

            string component = ShowComponents(objSerializedTarget, targetMethod.targetObject);

            // show component methods if selected
            if (!string.IsNullOrEmpty(component))
            {
                var method = ShowMethods(objSerializedTarget, targetMethod.targetObject, component);

                // show method parameters if selected
                if (method != null)
                {
                    objSerializedTarget.ApplyModifiedProperties();
                    ShowParameters(objSerializedTarget, targetMethod.targetObject, method);
                    ShowReturnValue(objSerializedTarget, method);
                }
            }
        }