-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Entity.RemoveComponent(typeName, changeType) - ambiguous call of overloaded function #760
Comments
Hmm, f.ex
This can be worked around by using the usual (awkward) QtScript overload syntax: |
The I think we should fix |
|
In your example the first RemoveComponent will fail due to the overload issue already mentioned. Commenting that out, the second one will fail:
This would have been very useful information when submitting the original issue and would have helped to get to the bottom of this right away. I've edited the title to reflect the issue better. To work around your issue for now use either of the following: me.RemoveComponent("Mesh");
// or
me.RemoveComponent("Mesh", "", AttributeChange.Replicate); Also note that me.RemoveAllComponents(); is not a smart move to be made from Script component of the me entity. ;) |
@Stinkfist0 Did you find out why this happens? |
Only the component id overload works correctly. Passing in componen typename string with or without the component name is ambiguous. Same thing for the ComponentPtr overload, it seems to be confusing comp ptrs with strings. Possibly beacause
IComponent.toString()
is defined (eg. you can doprint(ent.mesh);
)P.S. I am using the Meshmoon Rocket distro. Still needs to be verified if broken in the realXtend repo.
The text was updated successfully, but these errors were encountered: