Exemplo n.º 1
0
        void OnEnable()
        {
            profile                        = serializedObject.FindProperty("profile");
            profileSync                    = serializedObject.FindProperty("profileSync");
            targetProp                     = serializedObject.FindProperty("target");
            executeInEditMode              = serializedObject.FindProperty("executeInEditMode");
            active                         = serializedObject.FindProperty("_active");
            ignoreFrames                   = serializedObject.FindProperty("ignoreFrames");
            continuous                     = serializedObject.FindProperty("continuous");
            smooth                         = serializedObject.FindProperty("smooth");
            checkWorldPosition             = serializedObject.FindProperty("checkWorldPosition");
            minDistance                    = serializedObject.FindProperty("minDistance");
            worldPositionRelativeOption    = serializedObject.FindProperty("worldPositionRelativeOption");
            worldPositionRelativeTransform = serializedObject.FindProperty("worldPositionRelativeTransform");
            checkScreenPosition            = serializedObject.FindProperty("checkScreenPosition");
            minPixelDistance               = serializedObject.FindProperty("minPixelDistance");
            checkTime                      = serializedObject.FindProperty("checkTime");
            checkCollisions                = serializedObject.FindProperty("checkCollisions");
            timeInterval                   = serializedObject.FindProperty("timeInterval");
            collisionLayerMask             = serializedObject.FindProperty("collisionLayerMask");
            orientToSurface                = serializedObject.FindProperty("orientToSurface");
            surfaceOffset                  = serializedObject.FindProperty("surfaceOffset");
            duration                       = serializedObject.FindProperty("duration");
            maxStepsPerFrame               = serializedObject.FindProperty("maxStepsPerFrame");
            stepsBufferSize                = serializedObject.FindProperty("stepsBufferSize");
            drawBehind                     = serializedObject.FindProperty("drawBehind");
            cullMode                       = serializedObject.FindProperty("cullMode");
            subMeshMask                    = serializedObject.FindProperty("subMeshMask");
            cam                    = serializedObject.FindProperty("cam");
            colorSequence          = serializedObject.FindProperty("colorSequence");
            color                  = serializedObject.FindProperty("color");
            colorCycleDuration     = serializedObject.FindProperty("colorCycleDuration");
            pingPongSpeed          = serializedObject.FindProperty("pingPongSpeed");
            colorStartPalette      = serializedObject.FindProperty("colorStartPalette");
            colorOverTime          = serializedObject.FindProperty("colorOverTime");
            scaleOverTime          = serializedObject.FindProperty("scaleOverTime");
            effect                 = serializedObject.FindProperty("effect");
            texture                = serializedObject.FindProperty("texture");
            textureCutOff          = serializedObject.FindProperty("textureCutOff");
            localPositionRandomMin = serializedObject.FindProperty("localPositionRandomMin");
            localPositionRandomMax = serializedObject.FindProperty("localPositionRandomMax");
            scale                  = serializedObject.FindProperty("scale");
            scaleStartRandomMin    = serializedObject.FindProperty("scaleStartRandomMin");
            scaleStartRandomMax    = serializedObject.FindProperty("scaleStartRandomMax");
            scaleUniform           = serializedObject.FindProperty("scaleUniform");
            lookTarget             = serializedObject.FindProperty("lookTarget");
            lookToCamera           = serializedObject.FindProperty("lookToCamera");
            ground                 = serializedObject.FindProperty("ground");
            useLastAnimationState  = serializedObject.FindProperty("useLastAnimationState");
            maxBatches             = serializedObject.FindProperty("maxBatches");
            meshPoolSize           = serializedObject.FindProperty("meshPoolSize");
            animationStates        = serializedObject.FindProperty("animationStates");
            normalThreshold        = serializedObject.FindProperty("normalThreshold");
            laserBandWidth         = serializedObject.FindProperty("laserBandWidth");
            laserIntensity         = serializedObject.FindProperty("laserIntensity");
            laserFlash             = serializedObject.FindProperty("laserFlash");

            thisEffect = (TrailEffect)target;
            thisEffect.CheckEditorSettings();
        }
Exemplo n.º 2
0
 public void Load(TrailEffect effect)
 {
     effect.active                         = active;
     effect.ignoreFrames                   = ignoreFrames;
     effect.duration                       = duration;
     effect.continuous                     = continuous;
     effect.smooth                         = smooth;
     effect.checkWorldPosition             = checkWorldPosition;
     effect.minDistance                    = minDistance;
     effect.worldPositionRelativeOption    = worldPositionRelativeOption;
     effect.worldPositionRelativeTransform = worldPositionRelativeTransform;
     effect.checkScreenPosition            = checkScreenPosition;
     effect.minPixelDistance               = minPixelDistance;
     effect.maxStepsPerFrame               = maxStepsPerFrame;
     effect.checkTime                      = checkTime;
     effect.timeInterval                   = timeInterval;
     effect.checkCollisions                = checkCollisions;
     effect.orientToSurface                = orientToSurface;
     effect.ground                         = ground;
     effect.surfaceOffset                  = surfaceOffset;
     effect.collisionLayerMask             = collisionLayerMask;
     effect.cullMode                       = cullMode;
     effect.subMeshMask                    = subMeshMask;
     effect.drawBehind                     = drawBehind;
     effect.colorOverTime                  = colorOverTime;
     effect.color                  = color;
     effect.colorSequence          = colorSequence;
     effect.colorCycleDuration     = colorCycleDuration;
     effect.colorStartPalette      = colorStartPalette;
     effect.pingPongSpeed          = pingPongSpeed;
     effect.effect                 = this.effect;
     effect.texture                = texture;
     effect.scale                  = scale;
     effect.scaleStartRandomMin    = scaleStartRandomMin;
     effect.scaleStartRandomMax    = scaleStartRandomMax;
     effect.scaleOverTime          = scaleOverTime;
     effect.scaleUniform           = scaleUniform;
     effect.localPositionRandomMin = localPositionRandomMin;
     effect.localPositionRandomMax = localPositionRandomMax;
     effect.laserBandWidth         = laserBandWidth;
     effect.laserIntensity         = laserIntensity;
     effect.laserFlash             = laserFlash;
     effect.lookTarget             = lookTarget;
     effect.lookToCamera           = lookToCamera;
     effect.textureCutOff          = textureCutOff;
     effect.normalThreshold        = normalThreshold;
     effect.useLastAnimationState  = useLastAnimationState;
     effect.maxBatches             = maxBatches;
     effect.meshPoolSize           = meshPoolSize;
     effect.animationStates        = animationStates;
     effect.UpdateMaterialProperties();
 }
Exemplo n.º 3
0
 public void Save(TrailEffect effect)
 {
     active                         = effect.active;
     ignoreFrames                   = effect.ignoreFrames;
     duration                       = effect.duration;
     continuous                     = effect.continuous;
     smooth                         = effect.smooth;
     checkWorldPosition             = effect.checkWorldPosition;
     minDistance                    = effect.minDistance;
     worldPositionRelativeOption    = effect.worldPositionRelativeOption;
     worldPositionRelativeTransform = effect.worldPositionRelativeTransform;
     checkScreenPosition            = effect.checkScreenPosition;
     minPixelDistance               = effect.minPixelDistance;
     maxStepsPerFrame               = effect.maxStepsPerFrame;
     checkTime                      = effect.checkTime;
     timeInterval                   = effect.timeInterval;
     checkCollisions                = effect.checkCollisions;
     orientToSurface                = effect.orientToSurface;
     ground                         = effect.ground;
     surfaceOffset                  = effect.surfaceOffset;
     collisionLayerMask             = effect.collisionLayerMask;
     drawBehind                     = effect.drawBehind;
     cullMode                       = effect.cullMode;
     subMeshMask                    = effect.subMeshMask;
     colorOverTime                  = effect.colorOverTime;
     color                  = effect.color;
     colorSequence          = effect.colorSequence;
     colorCycleDuration     = effect.colorCycleDuration;
     colorStartPalette      = effect.colorStartPalette;
     pingPongSpeed          = effect.pingPongSpeed;
     this.effect            = effect.effect;
     texture                = effect.texture;
     scale                  = effect.scale;
     scaleStartRandomMin    = effect.scaleStartRandomMin;
     scaleStartRandomMax    = effect.scaleStartRandomMax;
     scaleOverTime          = effect.scaleOverTime;
     scaleUniform           = effect.scaleUniform;
     localPositionRandomMin = effect.localPositionRandomMin;
     localPositionRandomMax = effect.localPositionRandomMax;
     laserBandWidth         = effect.laserBandWidth;
     laserIntensity         = effect.laserIntensity;
     laserFlash             = effect.laserFlash;
     lookTarget             = effect.lookTarget;
     lookToCamera           = effect.lookToCamera;
     textureCutOff          = effect.textureCutOff;
     normalThreshold        = effect.normalThreshold;
     useLastAnimationState  = effect.useLastAnimationState;
     maxBatches             = effect.maxBatches;
     meshPoolSize           = effect.meshPoolSize;
     animationStates        = effect.animationStates;
 }