About Store Forum Documentation Contact



Post Reply 
Get created object pointer
Author Message
tipforeveryone Offline
Bronze Supporter

Post: #1
Get created object pointer
After using this to create object dynamically
Code:
Game.ObjMap<MyClass> myClasObjectList;

ObjectPtr obj = UID(2552926861, 1117558837, 264905372, 2361802078);
Game.World.objCreate(*obj, Matrix(obj->scale3(), startPos));
How can I get the pointer of new created object ?

like this
Code:
MyClass *myClassObj = &myClassObjectList[ myClassObjectList.elms() - 1];
//But this does not work sometime because the last element of Map is not always the latest created MyClass object
06-27-2020 05:32 AM
Find all posts by this user Quote this message in a reply
Houge Offline
Member

Post: #2
RE: Get created object pointer
Code:
Obj* Game::World::objCreateNear(Object &object, C Matrix &matrix, C UID *obj_id=null);
(This post was last modified: 06-27-2020 10:47 PM by Houge.)
06-27-2020 10:46 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply