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; }
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; }
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; }