Using OnTransformChanged() in an EmptyActor

I expected to be able to create my own actor, inheriting from EmptyActor and do this:

using FlaxEngine;
namespace Game;

public class EmptyTest : EmptyActor
{
    public override void OnTransformChanged()
    {
    }
}

But I can’t as OnTransformChanged can’t find a method to override. I looked at the docs and have obviously misunderstood how to use this. If someone could explain my error it would be much appreciated.

It’s exposed to C++ only now. C#/VisualScripts cannot override it now. I guess we should fix this problem soon.

2 Likes

Ha, I am a dummy, I didn’t notice I was looking at the cpp docs. It would be incredibly useful for me if it could get exposed to C# though, thanks.

2 Likes

This PR https://github.com/FlaxEngine/FlaxEngine/pull/2857 was just merged that exposed the requested method and a few others from the Actor class in c++ to c#

2 Likes

Amazing, thanks so much for the help.