Hi all,
I wonderd if anyone has any tips (or even a clever tool) that can batch create a load of items and associated hotspots, interactions and inventory items?
I'm wanting to create around 20 items all with similar properties, but different 3D models, that all need picked up by the player through the course of the game.
Each one would need:
It's own model with matching mesh collider
A hotspot script
A remember hotspot
A remember visibility
A matching inventory item
An associated pickup action for this item
I already use a custom action list asset to do all of my generic pickups with paramters for the item to hide, hotspot to disable and item to add to inventory - I'm just looking for a quicker way to perhaps bulk create a load of items, or setup a special prefab that can be dropped into the scene and then tweaked without having all of the manual dragging and dropping to hook up interactions and objects.
I'm sure others would benefit from this, as most P&C games might include 30 + items that all need to be picked up at some point. Perhaps a bulk object creator tool with a CSV import for all of their names and pickup dialogues for example.
Oh and the moon on a stick if anyone has that too
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Inventory items can be generated through script with:
This returns an InvItem class that you can then update with label, texture etc.
For the in-scene object, you're best off starting with a base object/prefab that has all the intended components - including Mesh Renderer, Mesh Filter etc - and then have your script duplicate it, and fill in all the necessary fields, Mesh included.
Stick with ActionList assets for any Hotspot interactions, and use the Set Interaction Parameters component to dynamically update the ActionList with its own data. This would be a bit tricky through script, but is possible. Best leave this one for last and get the above working first.
Very, very basic starter code:
Thanks Chris, as always a really neat way to make things more efficient.
I'll take a look at this as a way to semi automate a few of these, and try my best not to get side tracked with efficient tools rather than getting my game finished!
Much appreciated.