This is the AMP version of this page.
If you want to load the real page instead, click this text.

Solved How to call awake function?

Status
Not open for further replies.

HekaHeka709

Solid & Active Platinian
How to call awake and start function?

My Code:


void (*Awake)(void *instance);
void _Awake(void *instance) {
if (instance != NULL && boolean) {
Function(instance);
Awake(instance);
}
Awake(instance);
}
 
Last edited:
This question lacks a lot of details. Why do you need to call those functions to begin with?
And as for calling them, it's the same way. Either hook them or create a function pointer and call them inside another hook
 
This question lacks a lot of details. Why do you need to call those functions to begin with?
And as for calling them, it's the same way. Either hook them or create a function pointer and call them inside another hook
I wanna use function inside the class, and there is no update function so i use awake but it's only called once only when opening the game

My Code:


void (*Awake)(void *instance);
void _Awake(void *instance) {
if (instance != NULL && boolean) {
Function(instance);
Awake(instance);
}
Awake(instance);
}

It does work tho but only one time
 

Yes they are usually called once per event so it won't work. Find another class with an update function that uses the above instance and call it from there
 
Yes they are usually called once per event so it won't work. Find another class with an update function that uses the above instance and call it from there
oh is that so
It took me more than 50 tries trying to fix it and nothing work lol now i know why thanks.
and about what you said how would i do that? Can you give me link or thread that might help?
 
oh is that so
It took me more than 50 tries trying to fix it and nothing work lol now i know why thanks.
and about what you said how would i do that? Can you give me link or thread that might help?
 
Status
Not open for further replies.