Example #1
0
        private void OnReset()
        {
            if (_nativeLight != null)
            {
                _nativeLight.OnDestroy();
            }

            _nativeLight = new NativeLight(SceneObject);

            // Restore saved values after reset
            _nativeLight.Color                      = serializableData.color;
            _nativeLight.SpotAngle                  = serializableData.spotAngle;
            _nativeLight.SpotFalloffAngle           = serializableData.spotFalloffAngle;
            _nativeLight.Range                      = serializableData.range;
            _nativeLight.Intensity                  = serializableData.intensity;
            _nativeLight.Type                       = serializableData.type;
            _nativeLight.CastsShadow                = serializableData.castShadows;
            _nativeLight.PhysicallyBasedAttenuation = serializableData.physicallyBasedAttenuation;
        }
Example #2
0
        private void OnReset()
        {
            if (_nativeLight != null)
            {
                _nativeLight.OnDestroy();
            }

            _nativeLight = new NativeLight(SceneObject);

            // Restore saved values after reset
            _nativeLight.Color             = serializableData.color;
            _nativeLight.SpotAngle         = serializableData.spotAngle;
            _nativeLight.SpotFalloffAngle  = serializableData.spotFalloffAngle;
            _nativeLight.AttenuationRadius = serializableData.attenuationRadius;
            _nativeLight.SourceRadius      = serializableData.sourceRadius;
            _nativeLight.Intensity         = serializableData.intensity;
            _nativeLight.Type               = serializableData.type;
            _nativeLight.CastsShadow        = serializableData.castShadows;
            _nativeLight.UseAutoAttenuation = serializableData.useAutoAttenuation;
        }
Example #3
0
        private void OnReset()
        {
            if (_nativeLight != null)
                _nativeLight.OnDestroy();

            _nativeLight = new NativeLight(SceneObject);

            // Restore saved values after reset
            _nativeLight.Color = serializableData.color;
            _nativeLight.SpotAngle = serializableData.spotAngle;
            _nativeLight.SpotFalloffAngle = serializableData.spotFalloffAngle;
            _nativeLight.Range = serializableData.range;
            _nativeLight.Intensity = serializableData.intensity;
            _nativeLight.Type = serializableData.type;
            _nativeLight.CastsShadow = serializableData.castShadows;
            _nativeLight.PhysicallyBasedAttenuation = serializableData.physicallyBasedAttenuation;
        }