Unity Error: Material doesn’t have a texture property ‘_ShadowOffset’

Some textures will throw an error when you are trying to apply them. I encountered this when I tried to apply the BigTree_bark material to a tree branch. BigTree_branch did not give the error, so this is what I discovered:

Error:
Material doesn't have a texture property '_ShadowOffset'
UnityEditor.DockArea:OnGUI()

Explanation:
Read the rest of this entry »

Advertisements

Gizmos won’t show up?

Problem:
You are using OnDrawGizmos to use DrawCube, but your cubes aren’t showing up.

Example:
using UnityEngine;
using System.Collections;

public class SpawnPoint : MonoBehaviour {

public void OnDrawGizmos(){
Gizmos.DrawCube(transform.position, new Vector3(2,2,2));
}
}

Solution:
Read the rest of this entry »

C# Error: Best Overloaded method for Vector3

Problem:

error CS1502: The best overloaded method match for `UnityEngine.Vector3.Vector3(float, float, float)’ has some invalid arguments

Example:
Gizmos.DrawCube(transform.position, new Vector3(0.5,0.5,3.0));

Explanation:
In order to explicitly declare that 0.5 is a float, you must include the f modifier.

Solution:
Read the rest of this entry »