'How to use "Track_LOD" function' (Ver.3.0)

Please feel free to contact me if you have any questions.
shopmaster@chobi-glass.com
http://chobi-glass.com/Unity/index.html



*** Outline ***

This section shows how to use "Track_LOD" function in the tank made in the previous steps.

"Track_LOD" function is a simple solution to improve the performance in the game scenes by switching the "Static_Track" and the "Scroll_Tracks" in the tank according to the distance from the camera and the field of view of the camera.
When the tank is near the camera, the "Static_Track" is activated and the "Scroll_Tracks" are inactivated.
When the tank is far from the camera, the "Static_Track" is inactivated and the "Scroll_Tracks" are activated.




*** How to use "Track_LOD" function ***

(1) Attach "Track_LOD_Control_CS" script into the MainBody.

(Note.)
Skip this step, if the tank has already "Track_LOD_Control_CS (Script)" in the MainBody.


You can find the "Track_LOD_Control_CS" script in the "C#_Script" folder.


Drag and drop it into the "MainBody" in the Hierarchy window, and make sure that the script is added to the MainBody in the Inspector window.



(2) Set the references to the tracks.

Drag and drop the tracks into each box in the script.



(3) Test the behavior in the runtime.

Make sure that the tracks are switched according to the distance from the camera and the field of view of the camera.



Save the prefab, and progress to the next section.

Our new tank has got the same functions as the tank prefabs for the demo scenes.
About the general settings such as camera settings and hit points settings, please read the following tutorials.

Also we can convert our new tank into an AI tank by attaching some AI components.
Save the tank as a new prefab referring to 'How to save a new Tank Prefab' before converting it.

Please progress to the next section 'How to attach AI components'.