Asset Setup
Last updated
Last updated
This asset uses the netwonsoft json library for the save system. After importing the asset you may get following error:
To fix this go to the package manager and click on the + icon on the top left corner
Click on Add package by name and add com.unity.nuget.newtonsoft-json
Unity will then recompile and the error should be gone.
This asset was developed in the built-in render pipeline so it should work out of the box if you are using the same pipeline. For URP & HDRP simply navigate to the included RenderPipeline folder. Then double click on the upgrade for your render pipeline and import the upgraded assets. This will overwrite the materials and the shaders according to your used render pipeline
Please locate the GameConfig in the scene, create a new Layer and assign the placement layer mask to the new layer.
That's basically all you need to do configure in order to start your demo scene.
The grid placement system operates on a separate layer to give the user a visual feedback of where it is allowed to place objects. This means if the mouse is moving on some other object that is not on the same layer (like the grass floor), the input system won't recognize its movement and will not update the preview until you move back to the allowed grid layer. When you move back to the grid with the mouse, the preview will be updated again.
If you do not want the previously described behaviour you can also directly assign your newly created layer to the floor object so the placement system will recognize mouse movements across the whole floor (not only the defined grid). This would look something like this:
With this you will achieve that the preview is updated according to your mouse. So you can drag the objects outside of the grid, but obviously you will not be able to place it since it is not anymore within the grid size boundary.