示例#1
0
 static internal void Draw(Context context, VisualEffect component, VFXGizmo gizmo, bool forceRegister = false)
 {
     if (context.Prepare() || forceRegister)
     {
         gizmo.RegisterEditableMembers(context);
     }
     if (!context.IsIndeterminate())
     {
         gizmo.component    = component;
         gizmo.currentSpace = context.space;
         gizmo.CallDrawGizmo(context.value);
         gizmo.component = null;
     }
 }
示例#2
0
        static internal Bounds GetGizmoBounds(Context context, VisualEffect component, VFXGizmo gizmo, bool forceRegister = false)
        {
            if (context.Prepare() || forceRegister)
            {
                gizmo.RegisterEditableMembers(context);
            }
            if (!context.IsIndeterminate())
            {
                gizmo.component           = component;
                gizmo.currentSpace        = context.space;
                gizmo.spaceLocalByDefault = context.spaceLocalByDefault;
                Bounds bounds = gizmo.CallGetGizmoBounds(context.value);
                gizmo.component = null;

                return(bounds);
            }

            return(new Bounds());
        }