Skip to content

Hotload: Implement upgrader for interface instances #31

@MuffinTastic

Description

@MuffinTastic

Putting this in Game.cs...

public interface ITest
{
	public string TestProperty { get; set; }
}

public class TestImplementation : ITest
{
	public string TestProperty { get; set; }
}

public class Game : BaseGame
{
	// ...

	private ITest _instance;

	public override void Startup()
	{
		// ...

		_instance = new TestImplementation();

		// ...
	}

	// ...
}

... and then triggering a hotload by saving the file again results in this, and leaves the field/property null.
image

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions