public void ResetTutorial() { if (picture) { picture.GetComponent <PlaytimePainter>().DestroyWhateverComponent(); } if (cube) { var pntr = cube.GetComponent <PlaytimePainter>(); if (pntr && pntr.TexMeta != null) { pntr.TexMeta.lockEditing = true; } } if (pill) { var pntr = pill.GetComponent <PlaytimePainter>(); if (pntr && pntr.TexMeta != null) { pntr.ChangeTexture(null); } } PlaytimePainter.IsCurrentTool = false; _stage = HintStage.EnableTool; }
void SetStage(HintStage st) { stage = st; string ntext = "Well Done! Remember to save your textures before entering/exiting playmode."; string mb = (Application.isPlaying) ? "RIGHT MOUSE BUTTON" : "LEFT MOUSE BUTTON"; switch (stage) { case HintStage.enableTool: ntext = "Select the cube with " + mb + " and click 'On/Off' to start using painter."; break; case HintStage.draw: ntext = "Draw on the cube. \n You can LOCK EDITING for selected object."; break; case HintStage.addTool: ntext = "Picture to the right has no tool attached. \n Select it and \n Click 'Add Component'->'Mesh'->'TextureEditor'"; break; case HintStage.addTexture: ntext = "Ship on the left has no texture. Select him with " + mb + " and click 'Create Texture'"; break; case HintStage.renderTexture: int size = PainterCamera.renderTextureSize; ntext = "Change MODE to Render Texture. \n This will enable different option and will use two " + size + "*" + size + " Render Texture buffers for editing. \n" + "When using Render Texture to edit different texture2D, \n pixels will be updated at previous one."; break; } text = ntext; }
private void SetStage(HintStage st) { _stage = st; var mb = (Application.isPlaying) ? "RIGHT MOUSE BUTTON" : "LEFT MOUSE BUTTON"; string newText; switch (_stage) { case HintStage.EnableTool: newText = "Select the central cube and click 'On/Off' to start using painter. Unlock texture if locked."; break; case HintStage.UnlockTexture: newText = "Unlock texture on the cube (lock icon next to it)"; break; case HintStage.Draw: newText = "Draw on the cube. \n You can LOCK EDITING for selected texture."; break; case HintStage.AddTool: newText = "Picture to the right has no tool attached. \n Select it and \n Click 'Add Component'->'Mesh'->'Playtime Painter'"; break; case HintStage.AddTexture: newText = "Pill on the left has no texture. Select it with " + mb + " and click 'Create Texture' icon"; break; case HintStage.RenderTexture: int size = RenderTextureBuffersManager.renderBuffersSize; newText = "Change MODE to GPU Blit and paint with it. \n This will enable different option and will use two " + size + "*" + size + " Render Texture buffers for editing. \n"; break; case HintStage.WellDone: goto default; default: newText = "Well Done! Remember to save your textures before entering/exiting Play Mode."; break; } _text = newText; }