void OnGUI() { int ww = 200; int sx = Screen.width - ww; int sy = 60; int sw = ww; int sh = 30; int i = 0; SkinnedGUIOptions skinnedGUI = GetComponent <SkinnedGUIOptions>(); //WE LOAD MESH ONLY IN OBJECT MODE if (skinnedGUI.returnModeValue() == 0) { foreach (string fileName in filesNames) { if (GUI.Button(new Rect(sx, sy + i * sh, sw, sh), fileName)) { readFile(fileName); SaveAnimFile saveAnim = GetComponent <SaveAnimFile>(); saveAnim.SetFaceName("Assets\\" + fileName); } i++; } if (GUI.Button(new Rect(sx, 0, 150, 60), "Load Face")) { } } }
public void loadFace(string fileName) { readFile(fileName); SaveAnimFile saveAnim = GetComponent <SaveAnimFile>(); saveAnim.SetFaceName("Assets\\" + fileName); }