コード例 #1
0
    // Start is called before the first frame update
    void Start()
    {
        myTransform      = this.gameObject.transform;
        distance         = 20f;
        originalMaterial = this.gameObject.GetComponent <MeshRenderer>().material;
        //initializes audios list of the correct size according to how many audios are recorded in player preferences
        audios = new List <AudioClip>(PlayerPrefs.GetString("WellAudios_" + wellID, "").Split('/').Length - 1);
        //fills audios list
        AudioLoader loader = transform.parent.parent.GetComponent <AudioLoader>();

        loader.getAudiosForWell(wellID);
    }