Is it possible to call a method in an object by passing a string, like is done with ExecuteString in scripthelper.cpp?
I check the code and from what I can see it is not possible to extend to include object methods as that requires knowledge of the actual object pointer (which CompileFunction does not).
So is this possible in some other way? And if so, how do I go about?
Reason for wanting this, is because it is a more secure way for script to call methods in other modules.
ExecuteString in Object?
Lol double posts.
You could call a function by a string by going through the usual routine C++ side using the string you pass, but this could prove to be very slow when done in real time. If your C++ object holds a pointer to the angelscript object, then it is trivial to get the object pointer. Regardless, looking at the API it seems that you have to know the object pointer ahead of time.
You could call a function by a string by going through the usual routine C++ side using the string you pass, but this could prove to be very slow when done in real time. If your C++ object holds a pointer to the angelscript object, then it is trivial to get the object pointer. Regardless, looking at the API it seems that you have to know the object pointer ahead of time.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement