Skip to content
Snippets Groups Projects
create_gadget.txt 1.3 KiB
Newer Older
  • Learn to ignore specific revisions
  • Paul-Walcher's avatar
    Paul-Walcher committed
    
    1.) create gadget class derived from Gadget in Assets\Scripts\InteractionEngine\Gadgets
    
    2.) add into enum in Gadget class in Assets\Scripts\InteractionEngine\Gadgets\Gadget.cs
    3.) add into dictionary in Gadget class in Assets\Scripts\InteractionEngine\Gadgets\Gadget.cs
    4.) add a line into the json-definitions at the start of: Assets\Scripts\InteractionEngine\Gadgets\Gadget.cs
    
    	-> follow examples, recommendation: always use the class name 
    
    5.) go into: Assets\ScriptableObjects\Gadgets
    6.) create Scriptable Object in Assets\ScriptableObjects\gadgets
    7.) add into Assets\ScriptableObjects\Gadgets\GadgetDataContainerGadgetCollection
    8.) in Assets\ScriptableObjects\Gadgets\GadgetDataContainerGadgetCollection add new Element into "Gadget Data" and
        "Gadget Type" [same element index]
    9.) In "Gadget Data" insert the ScriptableObject you created
    10.) in "Gadget Type" insert the enum of the gadget you created
    
    -> in the ScriptableObject you created you can customize your gadget
    	- Rank: Position in toolbar
    	- UI Name: name of your gadget
    	- Button Indx:  sets the index of the sprite that is used as the icon in the toolbar,
    			you can find the indices in Assets\ScriptableObjects\Gadgets\GadgetDataContainerGadgetCollection,
    			as "Button Sprites", all possible sprites are in Assets\Scripts\InventoryStuff\Items\images