29-03-2019, 09:12 AM
Hello.
This is very basic question, but I cannot add Obi collider by AddComponent.
My code is.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ManSetting : MonoBehaviour
{
public GameObject man;
// Start is called before the first frame update
void Start()
{
man.AddComponent<MeshCollider>();
man.AddComponent<ObiCollider>();
}
}
However, error massage is displayed like the image.
This is very basic question, but I cannot add Obi collider by AddComponent.
My code is.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ManSetting : MonoBehaviour
{
public GameObject man;
// Start is called before the first frame update
void Start()
{
man.AddComponent<MeshCollider>();
man.AddComponent<ObiCollider>();
}
}
However, error massage is displayed like the image.