- A demo scene in
‘Indicator/_Scenes/_main’
‘Arrow Indicator’
and‘Box Indicator’
Prefabs in‘Indicator/Prefabs/’
‘PixelPlay.OffScreenIndicator.dll’
in‘Indicator/Scripts/Core/’
- Off screen indicator scripts in
‘Indicator/Scripts/OffScreenIndicator/’
- A utility script,
‘ExtendedFlyCam.cs’
in‘Indicator/Scripts/’
‘WhiteArrow’
and ‘WhiteBox’ sprites in‘Indicator/Sprites/’
- Arrow and Box Indicator->'Asset'
- Add a child to 'UI image' component, then adjust size
- Change the sprites in 'source image' for 'Image'script component
- New prefab need to attach 'Indicator.cs' from 'Scripts'
- Create a new tag named ‘Target’ in the ‘Tags and Layers’ inspector
- Open the scene in which you want to add the ‘Off screen target indicator’.
- Add a new Canvas to the ‘Hierarchy’ - ‘Render Mode’
- Right click on the above canvas and add a panel as a child to it. (You can rename the panel if you want to ‘Off screen indicator panel’).
- Set the alpha of the above panel to zero
- Add the ‘OffScreenIndicator.cs’ script to the above panel.
- In the same way add ‘ArrowObjectPool.cs’ and ‘BoxObjectPool.cs’ scripts to the panel. And assign the values of the ‘Pooled Object’ properties for both the scripts with the ‘Arrow Indicator’ and ‘Box Indicator’ prefabs respectively from the ‘Pixel Play/Prefabs/’ folder
- Now ‘Target.cs’ script from the scripts folder to all the target game objects in the scene and adjust the various values of the script properties as you see fit.
- Testing: add the provided ‘ExtendedFlyCam.cs’ script to ‘Main camera’ and hit ‘Play’.