Hi
I’ve looked through the posts with a similar problem, don’t seem to deal with what is happening here, well if they do trying the solution proposed hasn’t worked.
I am putting in a public string variable that I wish to expose to the inspector. Basically I am changing a NGUI script putting in the variavle ‘public string objectTagName’ as follows.
[AddComponentMenu(“NGUI/Examples/Drag & Drop Surface”)]
public class DragDropSurface : MonoBehaviour
{
public bool rotatePlacedObject = false;
public string objectTagName;
void OnDrop (GameObject go)
{
DragDropItem ddo = go.GetComponent();
if (ddo != null && ddo.tag == "Player")
{
GameObject child = NGUITools.AddChild(gameObject, ddo.prefab);
Transform trans = child.transform;
trans.position = UICamera.lastHit.point;
if (rotatePlacedObject) trans.rotation = Quaternion.LookRotation(UICamera.lastHit.normal) * Quaternion.Euler(90f, 0f, 0f);
Destroy(go);
}
}
}
I don’t normally use C# and know nothing of it’s little peculiarities. Don’t quite understand why this is not showing though, should be straightforward. Am I missing something? Any assistance would be greatly appreciated.