Hi All!,
I’m compiling an Application framework based on the code from the ‘First Project’.
Now, i understand that this framework has one Start method, and from there you set your event handlers and what not. Now, in the examples I happily went through the extra Components like LogicComponent, and Component. However, I cannot for the life of me register a component in my Start method of the ‘First Project’.
In my main class I declare
Hi,
I believe its registered in the Component class like…
void Laser::RegisterObject(Context* context)
{
cout << "reg here " << endl;
context->RegisterFactory();
}
You don’t need to write your own main function. Instead just inherit from Urho3D::Application and write your own class App final : public Application class with overrides for Setup(), Start(), and Stop(). At the bottom of your app.cpp file write this:
I must say registering new components is quite ambitious for a newbie. Have you tried getting a bare-bones project compiled and running, e.g. just a blank window?
It’s hard to help you without more context. Have ever successfully compiled and run any Urho3D project? That is the starting point. Also, you can use back ticks to autoformat code snippets.