private static void Prefix(ref TrackLaneRingsRotationEffect ____trackLaneRingsRotationEffect) { TrackLaneRingsRotationEffect oldRotationEffect = ____trackLaneRingsRotationEffect; ChromaRingsRotationEffect newRotationEffect = oldRotationEffect.gameObject.AddComponent <ChromaRingsRotationEffect>(); newRotationEffect.CopyValues(oldRotationEffect); ____trackLaneRingsRotationEffect = newRotationEffect; }
#pragma warning disable SA1313 // Parameter names should begin with lower-case letter private static void Prefix(ref TrackLaneRingsRotationEffect ____trackLaneRingsRotationEffect) #pragma warning restore SA1313 // Parameter names should begin with lower-case letter { TrackLaneRingsRotationEffect oldRotationEffect = ____trackLaneRingsRotationEffect; ChromaRingsRotationEffect newRotationEffect = oldRotationEffect.gameObject.AddComponent <ChromaRingsRotationEffect>(); newRotationEffect.CopyValues(oldRotationEffect); ____trackLaneRingsRotationEffect = newRotationEffect; }
private static void Prefix(ref TrackLaneRingsRotationEffect ____trackLaneRingsRotationEffect) { if (____trackLaneRingsRotationEffect.GetType() == typeof(TrackLaneRingsRotationEffect)) { TrackLaneRingsRotationEffect oldRotationEffect = ____trackLaneRingsRotationEffect; ChromaRingsRotationEffect newRotationEffect = oldRotationEffect.gameObject.AddComponent <ChromaRingsRotationEffect>(); newRotationEffect.CopyValues(oldRotationEffect); UnityEngine.Object.Destroy(oldRotationEffect); ____trackLaneRingsRotationEffect = newRotationEffect; } }