-
Notifications
You must be signed in to change notification settings - Fork 7
Closed
Labels
Milestone
Description
Reproduction
- Put this in Game.cs
// ...
public abstract class Abstract { }
public class Implementation : Abstract
{
public int Field;
public string Property { get; set; }
}
public class Game : BaseGame
{
// ...
public Abstract _instance;
public override void Startup()
{
// ...
_instance = new Implementation
{
Field = 123,
Property = "!olleH dlroW"
};
// ...
}
// ...
}Notes
Abstract classes and their implementations can obviously be from different assemblies, not sure what a clean way to handle that would be. Maybe something like this would work:
- If the old implementation type is from the assembly we're swapping out, attempt to get a class of the same name from the new assembly and instantiate that
- Else, just make a new instance of the old implementation type (It's probably from some .NET or Mocha assembly or something)
Just spitballing though
