- Home /
Question by
IBOstro · May 19, 2011 at 05:28 PM ·
syntax-erroruce0001island-demo
When I try to run the Island Demo on Unity 3 I get this error.
Assets/Editor/UpdateTreeColors.js(31,63): UCE0001: ';' expected. Insert a semicolon at the end.
this is the code when I doubleclick on the error in the log:
@MenuItem("Terrain/Update Tree Lightmap Color")
static function RebuildWithLightmap () {
var tex : Texture2D = Selection.activeObject as Texture2D;
if (tex)
{
if (Terrain.activeTerrain == null || Terrain.activeTerrain.terrainData == null)
{
EditorUtility.DisplayDialog("No active terrain in the scene", "No active terrain in the scene", "Ok");
return;
}
Undo.RegisterUndo(Terrain.activeTerrain.terrainData, "Set Tree colors");
UnityEditor.TerrainLightmapper.UpdateTreeLightmapColor(tex, Terrain.activeTerrain.terrainData);
}
else
EditorUtility.DisplayDialog("Select a lightmap", "Select a lightmap", "Ok");
}
@MenuItem("Terrain/Update Tree Color")
static function RebuildWithColor () {
var tex : Texture2D = Selection.activeObject as Texture2D;
if (tex)
{
if (Terrain.activeTerrain == null || Terrain.activeTerrain.terrainData == null)
{
EditorUtility.DisplayDialog("No active terrain in the scene", "No active terrain in the scene", "Ok");
return;
}
Undo.RegisterUndo(Terrain.activeTerrain.terrainData, "Set Tree colors");
UnityEditor.TerrainLightmapper.UpdateTreeColor//(tex, Terrain.activeTerrain.terrainData);
}
else
EditorUtility.DisplayDialog("Select a lightmap", "Select a lightmap", "Ok");
}
Comment
Please put in some effort to format your questions properly if you expect people to help you.
Answer by red 2 · May 26, 2011 at 06:38 PM
change
UnityEditor.TerrainLightmapper.UpdateTreeColor//(tex, Terrain.activeTerrain.terrainData);
to
UnityEditor.TerrainLightmapper.UpdateTreeColor(tex, Terrain.activeTerrain.terrainData);
it seems you accidently added comment slashes