Jump to content

View more

Image of the Day

The night is still, but the invasion brings chaos. #screenshotsaturday #hanako #indiegame #gameart #ue4 #samurai https://t.co/cgILXuokoS
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now
- - - - -

I want to save a registered object ref type in my script class, but

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
1 reply to this topic

#1 wdl7770016   Members   

104
Like
0Likes
Like

Posted 29 April 2013 - 05:29 AM

the error report tell me : There is no copy operator for the type 'Entity' available.

What should I do? register a copy behaviour?but I don't find a Enum like asBEHAVE_COPY....

and mannual is no say how to do it....maybe just I not find it

help me -0 -please XD



#2 Jake Albano   Members   

722
Like
0Likes
Like

Posted 29 April 2013 - 10:22 AM

How did you register the method that you're passing the entity to? My guess is that you did this:

 

engine->RegisterObjectMethod("type", "void method(Entity e)", asMETHOD(Type, method), asCALL_THISCALL);

 

and what you need to do is this:

 

engine->RegisterObjectMethod("type", "void method(Entity@ e)", asMETHOD(Type, method), asCALL_THISCALL);

 

Assuming your Entity is a reference type.

 

For the record, the manual page that involves copy operators is here.






Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.