private void LoadPlayerResources() { m_pPhysicMaterials = new PhysicMaterial[3]; m_pPhysicMaterials[0] = Resources.Load(SOLID_PHYSIC_MATERIAL) as PhysicMaterial; m_pPhysicMaterials[1] = Resources.Load(LIQUID_PHYSIC_MATERIAL) as PhysicMaterial; m_pPhysicMaterials[2] = Resources.Load(GAS_PHYSIC_MATERIAL) as PhysicMaterial; GameObject o; o = Instantiate(Resources.Load(PLAYER_MODEL_PREFAB)) as GameObject; m_PlayerModel = o.GetComponent<PlayerModel>(); m_PlayerModel.SetHostPlayer(this); m_PlayerModel.InitPlayerModel(); LoadResources(); // Ensure our tag is always Player! tag = "Player"; }