Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- using UnityEditor;
- using System;
- using System.Diagnostics;
- public class runFilePath: MonoBehaviour {
- public int amountOfPrPaths = 0; //кол-во сохраненных программ
- public struct savePath { //Структура
- public string prPath;
- public int id;
- public AudioClip prAudioClip;
- /*savePath(string pr, int idk) {
- prPath = pr;
- id = idk;
- }*/
- }
- public savePath [] ProgsPath; //инициализация массива
- void OnGui() {
- GUI.Box(new Rect(400, 270, 150, 50), "ProgsPath[amountOfPrPaths].id");
- GUI.Box(new Rect(400, 330, 150, 50), "ProgsPath[amountOfPrPaths].prPath");
- }
- void Start() {
- ProgsPath = new savePath[amountOfPrPaths];
- }
- void Update() {
- if(GetComponent<Record>().canSave == true) {
- amountOfPrPaths = GetComponent<Record>().idPr;
- ProgsPath[amountOfPrPaths].id=amountOfPrPaths;
- ProgsPath[amountOfPrPaths].prAudioClip=GetComponent<Record>().bofferAudioClip;
- ProgsPath[amountOfPrPaths].prPath=GetComponent<Record>().path;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement