/// <summary> /// Changes 'space' bar mesh /// </summary> /// <param name="creator"></param> public void ManipulateSpace(KeyboardCreator creator, Sprite spaceSprite) { this.spaceSprite = spaceSprite; if (meshCreator == null) { meshCreator = new SpaceMeshCreator(creator); } meshCreator.Recalculate9Slice(spaceSprite, creator.ReferencedPixels); if (!creator.wasStaticOnStart) { Init(); meshCreator.BuildFace(quadFront, true); } }
private void Awake() { keyboardCreator = target as KeyboardCreator; if (!Application.isPlaying || !keyboardCreator.gameObject.isStatic) // Always when not playing or (playing and keyboard is not static) { keyboardCreator.wasStaticOnStart = false; KeyboardItem.forceInit = true; if (keyboardCreator.RaycastingSource != null) { keyboardCreator.ManageKeys(); } keyboardScale = keyboardCreator.transform.localScale; } }
public override void OnInspectorGUI() { keyboardCreator = target as KeyboardCreator; keyboardCreator.checkErrors(); errorReporter = ErrorReporter.Instance; if (errorReporter.currentStatus == ErrorReporter.Status.None || !Application.isPlaying) // (Playing and was static at start) or always when not playing { DrawPrimary(); DrawMaterials(); DrawSpace(); GUI.enabled = true; CameraFinder(); HandleValuesChanges(); } DisplayWarnings(); }
public SpaceMeshCreator(KeyboardCreator creator) { this.creator = creator; }