Hello every one am going to use the underwater scrips from unity in Unity 4.2.1,And wen i open in a new project it set that the float cant be converted to unity here is the scrips from unity island underwater can any one help me.
It helps to write down the error word for word, and what line the error is on. Also your code is easier to read if our code is inside code tags. You can find the code tags options from clicking the Go Advanced button at the bottom right of the page when creating your post.
Thanks Black Mantis:Wen i make the change it wen from underwater scrip to update scrips i thing this scrip don’t work on unity 4 they whore make for Unity 2.6 or below, Unles Unity fix this scrip to work with unity 4 i won’t be able to use them
@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");
}
PS. I remove this scrips from the island and is working fine know.
Thank you for the help