Game Development Reference
In-Depth Information
Tutorial 6.1: Adding and Manipulating
Unity Water, Sky, and Fog
Before getting to the business at hand, it's worthwhile to revisit the idea
of Packages. In Unity, we have seen how to import meshes that become
GameObjects that have attached to them materials (and other components).
These GameObjects can also have scripts and other functionality hung on them
as additional components. When a GameObject has scripts attached to it, or
special shaders to define the visual appearance, it can be a fairly robust asset.
To move these robust assets from project to project, Unity has developed this
idea of packages that contain decorated and configured GameObjects. When
the project was created, we imported the Character Controller packages that
included the prefab GameObjects of First Person Controller (which has already
been used in the scene). At the time the project was created we refrained
from adding other packages to keep the project lean and mean.
At this point, however, there are some very sophisticated and beautiful-looking
prefabs that Unity has created that would be useful to us here … specifically
the water. In this tutorial we will look at importing these additional assets via
packages and place them in our scene.
Importing Packages
Step 1: Open Unity. Make sure to set the project to Incursion-Unity.
Step 2: Import Water packages. Choose Assets>Import Package>Water
(Basic or Pro depending on which license you have). If you have Unity Pro,
import the Water (Pro Only) package. If you are using the free Unity, use
Water (Basic) .
Why?
What's the difference? Unity Pro includes some render to texture effects
that allow for some more visually sophisticated water. Although you can
import both packages (which I do for screen shot purposes here), if you do
not have a Pro license, the functionality of the Pro water will not be seen.
Step 3: After Unity decompresses the package, press Import in the
Importing Package window that will pop up. Unity will then bring up an
Importing Assets progress bar. When done, a new Water (Pro Only) folder
or Water (Basic) folder will appear as a child of the Standard Assets folder
within the Project panel.
Water
Step 4: Explore the water prefabs this process has brought in. In the
Project panel, expand the Water folder and click once on one of the
prefabs that has been imported (either Daylight Water/Nighttime Water
 
Search WWH ::




Custom Search