public Character(string _name) { if (_name.Contains("priest")) { Role = Object.Instantiate(Resources.Load("Prefab/Priest", typeof(GameObject)), Vector3.zero, Quaternion.identity, null) as GameObject; } else { Role = Object.Instantiate(Resources.Load("Prefab/Devil", typeof(GameObject)), Vector3.zero, Quaternion.identity, null) as GameObject; } IsOnBoat = false; Name = _name; mScript = Role.AddComponent(typeof(Moveable)) as Moveable; }