My apologies if this question has been answered before, but I’m at the point where I’ve done a decent amount of searching around, and all of the answers are either too old to work or aren’t answers (from what I can see). I’ve read through the LY docs on creating components, but thus far I can’t seem to figure it out.
With regards to that: How do I go about making a component? I come from Unity and Unreal, where components seem to be used in the same way (more or less). The problem is, making them in LY seems much more involved. That’s not necessarily bad, but I’m genuinely struggling to figure out how to do it. Most posts I’ve seen have suggested to do it with a Gem. Great. But how?
I can (probably) figure out the code behind the component. What I’m confused about is: Where do I put them? How do I integrate them? Is there a specific place the files must go? Things like this are where I’m getting tripped up.
Thanks for any help you can provide,
This answered so many questions! Thank you very much. Even just this little bit has gotten me to the point where I can at least begin writing some code instead of banging my head against my desk for hours.
I do have a quick question though. If possible, and again, I apologize that this is somewhat of a beginner question, but would you mind going a little further in depth with the:
- Any code files you add are in the .waf_files file in the folder with your Gem. You will probably need to configure the gem.json file and might need to change the wscript file which handles dependencies.
- Once you have a working Component class you just need the matching file paths in the .waf_files and to update the descriptors list in the Module class’s constructor and that should get your Component started.
bullet points? Is there a reference for this somewhere that would explain how to go about configuring these?
Thanks very much! I’ll keep it in mind!
I’m not aware of any recent online documentation for most of that, which is frequently asked for, but you can probably find examples in other Gems such as “StarterGameGem” or other Lumberyard Gems. I usually just use a text Search option in my Editor to search the Lumberyard code base for specific strings like “->DataElement(” or “->Attribute” or something similar which creates a fairly good summary of what your probably looking for. You can change the .waf_files file names but they all get tied into the wscript file in your gem’s folder.