I have a problem with my Unity 3 Island demo project i cant play it and use it cuz of 2 errors 1st one:
Assets/Editor/UpdateTreeColor.js(13,29… BCE0019: TerrainLightmapper is not a member of UnityEditor
2 one:
Assets/Editor/UpdateTreeColor.js(31,29… BCE0019: TerrainLightmapper is not a member of UnityEditor
Any help appreciated
remove the 2 lines and it will work
lies??? i have the same problem
Assets/Editor/UpdateTreeColors.js(13,29): BCE0019: ‘TerrainLightmapper’ is not a member of ‘UnityEditor’.
I don’t see how you can have errors with something you removed.
@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”);
I have this error
Assets/Editor/UpdateTreeColors.js(13,29): BCE0019: ‘TerrainLightmapper’ is not a member of ‘UnityEditor’.
what do i need to do here?
}
then when I delete one line I have this error
Assets/Editor/UpdateTreeColors.js(32,9): BCE0044: expecting }, found ‘else’.
@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.terrainDat a, "Set Tree colors");
}
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.terrainDat a, "Set Tree colors");
}
else
EditorUtility.DisplayDialog("Select a lightmap", "Select a lightmap", "Ok");
I deleted the lines that referenced TerrainLightMapper. Just like appels said.
just delete the file updatetreecolors.js
I got it!!! Thanks for replying guys!! it’s very generous of you!!!
Okay can someone tell em what is the program that Numbers the lines? is it C++ or w/e???
The program that numbers the lines?
I’m afraid I have no clue what you’re talking about.
Like in notepad or in your script it’s like
1
2
3
4
5
6
also I’m getting a error in this
var speed = 3.0;
var rotateSpeed = 3.0;
var bullitPrefab:Transform;
function Update ()
{
var controller : CharacterController = GetComponent(CharacterController);
transform.Rotate(0, Input.GetAxis (“Horizontal”) * rotateSpeed, 0);
var forward = transform.TransformDirection(Vector3.forward);
var curSpeed = speed * Input.GetAxis (“Vertical”);
controller.SimpleMove(forward * curSpeed);
if(Input.GetButtonDown(“Jump”))
{
var bullit = Instantiate(bullitPrefab, GameObject.Find(“spawnPoint”).transform.position, Quaternion.identity);
}
}
@script RequireComponent(CharacterController)
NullReferenceException
movearoundd.Update () (at Assets/Birds/movearoundd.js:14)
For the numbers, it would be an option inside the script editor you are using.
The error is occurring because your bullitPrefab is not referencing anything. You need to link it via the inspector. Either that or there is no GameObject with the name “spawnPoint” in your scene.
lol Uhm I’m honestly new to all this learning Languages and code…so what did I do wrong?
your right!!! it was all right but the Object name was “spawnpoint” with no caps! Okay I got it awesome! thank you!
Do you have skype? could i add you?
On the top of your code, you declared a Transform with the name bullitPrefab
var bullitPrefab:Transform;
It is never assigned in the code, but it is (by default) public, which means it can be assigned through the inspector. Drag the prefab that is the bullet on the bullitPrefab slot when you select the GameObject this script is attached to. If it is not assigned via the inspector, it will be null and would cause your error.
In your Instantiate call
var bullit = Instantiate(bullitPrefab, GameObject.Find(“spawnPoint”).transform.position, Quaternion.identity);
You set the position of the newly created object to the position of the “spawnPoint” GameObject. If there is no “spawnPoint” GameObject, GameObject.Find will return null, which will generate an error.
EDIT: I wrote it all for naught ;(
PM’ed you my Skype.
Its an asterisk ‘*’ ![]()
It means multiply.
the star? shift +8? *
Thats the one.