Overview
During my 2 week adventure so far in GDevelop, I needed a way to create a “prefab” for some of my objects so that I can easily make changes to it without needing to change the object in every scene individually. That’s when I was messing around and started using extensions. Keep in mind that I am not looking any YouTube videos or tutorials for making my first game and I am only utilizing to official documentation and the forums for information. Its kind of my challenge to myself and something fun for me to do while I solve problems using the engine. I tried searching for this on the forums and I couldn’t not find it unfortunately, but I eventually figured it out from trial and error.
Custom Extension
When I created my first custom extension, I was wondering why the size of the object was not the same as the full object. It was something that was not a big deal for my game, but I felt a burning desire to understand why that was happening and how I can change it.
Here you can see that the grey outline which is the object size, does not fill the entire object that I have.
After messing around a bit, I found this icon at the top right of my screen which looks like a movie reel and a pencil. Once clicking it, I have uncovered that this is the properties for the object.
I was able to change the actual size of the extension object to the desired size that I want it to be.
Now when looking at the object in the editor the size of the extension object now matches the size of the objects inside of it. Awesome!
Conclusion
This will help me out not only in this game but future games that I develop which would need the exact size of the object for certain functionality or behaviors. I hope that you enjoyed reading and maybe learned something that you didn’t know before hand.
Have a great day and happy creating!