Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class Skin_Instantiator : MonoBehaviour {
- public GameObject[] Skins;
- private string Skin_type;
- public Vector3 Skin_pos;
- public Quaternion Skin_rot;
- // Use this for initialization
- void Start ()
- {
- Skin_type = PlayerPrefs.GetString("Skin_type", "Normal");
- switch(Skin_type)
- {
- case "Normal":
- Instantiate(Skins[0], Skin_pos, Skin_rot);
- break;
- case "Headphone":
- Instantiate(Skins[1], Skin_pos, Skin_rot);
- break;
- }
- }
- // Update is called once per frame
- void Update () {
- }
- }
Add Comment
Please, Sign In to add comment