FastScriptReload icon indicating copy to clipboard operation
FastScriptReload copied to clipboard

Generic class parameter isn't updated to patched version

Open RunninglVlan opened this issue 9 months ago • 1 comments

This

public class ZoomEvent : MouseEventBase<ZoomEvent> {
  public Vector2 Delta { get; private set; }

  public static ZoomEvent GetPooled(Vector2 delta) {
    var pooled = MouseEventBase<ZoomEvent>.GetPooled();
    pooled.Delta = delta * WheelEvent.scrollDeltaPerTick;
    // ...
    return pooled;
  }
}

produces following

public class ZoomEvent__Patched_: MouseEventBase<ZoomEvent> { // I guess there should be MouseEventBase<ZoomEvent__Patched_>?
  public Vector2 Delta { get; private set; }

  public static ZoomEvent__Patched_ GetPooled(Vector2 delta) {
    var pooled = MouseEventBase<ZoomEvent>.GetPooled(); // And here too?
    pooled.Delta = delta * WheelEvent.scrollDeltaPerTick;
    // ...
    return pooled;
  }
}

RunninglVlan avatar Feb 18 '25 13:02 RunninglVlan

Related to https://github.com/handzlikchris/FastScriptReload/issues/161 These rules seem they will be related when implemented.

builder-main avatar Mar 04 '25 14:03 builder-main