コード例 #1
0
        public PrefabModuleEditor(PrefabPainterEditor editor)
        {
            this.editor       = editor;
            this.editorTarget = editor.GetPainter();

            LoadTemplateCollection();
        }
コード例 #2
0
        public SplineModuleEditor(PrefabPainterEditor editor)
        {
            this.editor = editor;
            this.gizmo  = editor.GetPainter();

            curveResolution = editor.FindProperty(x => x.splineSettings.curveResolution);
            loop            = editor.FindProperty(x => x.splineSettings.loop);

            separation         = editor.FindProperty(x => x.splineSettings.separation);
            separationDistance = editor.FindProperty(x => x.splineSettings.separationDistance);

            separationDistanceMin = editor.FindProperty(x => x.splineSettings.separationDistanceMin);
            separationDistanceMax = editor.FindProperty(x => x.splineSettings.separationDistanceMax);

            lanes          = editor.FindProperty(x => x.splineSettings.lanes);
            laneDistance   = editor.FindProperty(x => x.splineSettings.laneDistance);
            skipCenterLane = editor.FindProperty(x => x.splineSettings.skipCenterLane);

            instanceRotation     = editor.FindProperty(x => x.splineSettings.instanceRotation);
            controlPointRotation = editor.FindProperty(x => x.splineSettings.controlPointRotation);
            attachMode           = editor.FindProperty(x => x.splineSettings.attachMode);

            reusePrefabs = editor.FindProperty(x => x.splineSettings.reusePrefabs);

            snap  = editor.FindProperty(x => x.splineSettings.snap);
            debug = editor.FindProperty(x => x.splineSettings.debug);

            dirty = editor.FindProperty(x => x.splineSettings.dirty);
        }
コード例 #3
0
        public SpawnExtension(PrefabPainterEditor editor)
        {
            this.editor       = editor;
            this.editorTarget = editor.GetPainter();

            autoSimulationType         = editor.FindProperty(x => x.spawnSettings.autoSimulationType);
            autoSimulationHeightOffset = editor.FindProperty(x => x.spawnSettings.autoSimulationHeightOffset);
        }
コード例 #4
0
        private bool needsPhysicsApplied = false; // TODO property


        public InteractionModuleEditor(PrefabPainterEditor editor)
        {
            this.editor       = editor;
            this.editorTarget = editor.GetPainter();

            interactionType     = editor.FindProperty(x => x.interactionSettings.interactionType);
            antiGravityStrength = editor.FindProperty(x => x.interactionSettings.antiGravityStrength);
            magnetStrength      = editor.FindProperty(x => x.interactionSettings.magnetStrength);
        }
コード例 #5
0
        public PhysicsExtension(PrefabPainterEditor editor)
        {
            this.editor = editor;
            this.gizmo  = editor.GetPainter();

            if (this.gizmo.physicsSimulation == null)
            {
                this.gizmo.physicsSimulation = ScriptableObject.CreateInstance <PhysicsSimulation>();
            }
        }
コード例 #6
0
        public PhysicsExtension(PrefabPainterEditor editor)
        {
            this.editor       = editor;
            this.editorTarget = editor.GetPainter();

            forceApplyType      = editor.FindProperty(x => x.physicsSettings.forceApplyType);
            maxIterations       = editor.FindProperty(x => x.physicsSettings.maxIterations);
            forceMinMax         = editor.FindProperty(x => x.physicsSettings.forceMinMax);
            forceAngleInDegrees = editor.FindProperty(x => x.physicsSettings.forceAngleInDegrees);
            randomizeForceAngle = editor.FindProperty(x => x.physicsSettings.randomizeForceAngle);
            simulationTime      = editor.FindProperty(x => x.physicsSettings.simulationTime);
            simulationSteps     = editor.FindProperty(x => x.physicsSettings.simulationSteps);
        }
コード例 #7
0
        public BrushModuleEditor(PrefabPainterEditor editor)
        {
            this.editor = editor;
            this.gizmo  = editor.GetPainter();

            brushSize     = editor.FindProperty(x => x.brushSettings.brushSize);
            brushRotation = editor.FindProperty(x => x.brushSettings.brushRotation);

            alignToTerrain    = editor.FindProperty(x => x.brushSettings.alignToTerrain);
            distribution      = editor.FindProperty(x => x.brushSettings.distribution);
            poissonDiscSize   = editor.FindProperty(x => x.brushSettings.poissonDiscSize);
            fallOffCurve      = editor.FindProperty(x => x.brushSettings.fallOffCurve);
            fallOff2dCurveX   = editor.FindProperty(x => x.brushSettings.fallOff2dCurveX);
            fallOff2dCurveZ   = editor.FindProperty(x => x.brushSettings.fallOff2dCurveZ);
            curveSamplePoints = editor.FindProperty(x => x.brushSettings.curveSamplePoints);
            allowOverlap      = editor.FindProperty(x => x.brushSettings.allowOverlap);

            spawnToVSPro = editor.FindProperty(x => x.brushSettings.spawnToVSPro);
        }
コード例 #8
0
        public PhysicsExtension(PrefabPainterEditor editor)
        {
            this.editor = editor;
            this.gizmo  = editor.GetPainter();

            forceApplyType      = editor.FindProperty(x => x.physicsSettings.forceApplyType);
            maxIterations       = editor.FindProperty(x => x.physicsSettings.maxIterations);
            forceMinMax         = editor.FindProperty(x => x.physicsSettings.forceMinMax);
            forceAngleInDegrees = editor.FindProperty(x => x.physicsSettings.forceAngleInDegrees);
            randomizeForceAngle = editor.FindProperty(x => x.physicsSettings.randomizeForceAngle);
            simulationRunning   = editor.FindProperty(x => x.physicsSettings.simulationRunning);
            simulationStepCount = editor.FindProperty(x => x.physicsSettings.simulationStepCount);

            if (physicsSimulation == null)
            {
                physicsSimulation = ScriptableObject.CreateInstance <PhysicsSimulation>();
            }
            physicsSimulation.ApplySettings(gizmo.physicsSettings);
        }
コード例 #9
0
        public BrushModuleEditor(PrefabPainterEditor editor)
        {
            this.editor       = editor;
            this.editorTarget = editor.GetPainter();


            brushSize     = editor.FindProperty(x => x.brushSettings.brushSize);
            brushRotation = editor.FindProperty(x => x.brushSettings.brushRotation);

            alignToTerrain    = editor.FindProperty(x => x.brushSettings.alignToTerrain);
            distribution      = editor.FindProperty(x => x.brushSettings.distribution);
            poissonDiscSize   = editor.FindProperty(x => x.brushSettings.poissonDiscSize);
            fallOffCurve      = editor.FindProperty(x => x.brushSettings.fallOffCurve);
            fallOff2dCurveX   = editor.FindProperty(x => x.brushSettings.fallOff2dCurveX);
            fallOff2dCurveZ   = editor.FindProperty(x => x.brushSettings.fallOff2dCurveZ);
            curveSamplePoints = editor.FindProperty(x => x.brushSettings.curveSamplePoints);
            allowOverlap      = editor.FindProperty(x => x.brushSettings.allowOverlap);

            // initialize integrated applications
            vegetationStudioProIntegration = new VegetationStudioProIntegration(editor);
        }
コード例 #10
0
        #pragma warning restore 0414

        public PrefabModuleEditor(PrefabPainterEditor editor)
        {
            this.editor = editor;
            this.gizmo  = editor.GetPainter();
        }
コード例 #11
0
 public SelectionExtension(PrefabPainterEditor editor)
 {
     this.editor = editor;
     this.gizmo  = editor.GetPainter();
 }
コード例 #12
0
        #pragma warning restore 0414

        public ContainerModuleEditor(PrefabPainterEditor editor)
        {
            this.editor       = editor;
            this.editorTarget = editor.GetPainter();
        }
コード例 #13
0
 public ToolsExtension(PrefabPainterEditor editor)
 {
     this.editor       = editor;
     this.editorTarget = editor.GetPainter();
 }
コード例 #14
0
 public CopyPasteExtension(PrefabPainterEditor editor)
 {
     this.editor = editor;
     this.gizmo  = editor.GetPainter();
 }