// Use this for initialization void Awake() { // Set the singleton instance Instance = this; // Create a canvas parent m_CanvasParent = new GameObject("_Canvas parent").transform; m_CanvasParent.SetParent(transform); // Set the onstroke complete event m_ActiveBrush.OnStrokeCompleteEvent += ActiveBrush_OnStrokeCompleteEvent; // Create a new canvas CreateNewCanvas(); m_MaxSaveIndex = PlayerPrefs.GetInt("m_MaxSaveIndex", 0); m_CurrentLoadedIndex = 0; m_MaxSaveIndex = m_SaveIndex; }
// Use this for initialization void Awake() { m_PaintManager = FindObjectOfType <Painter3DManager>(); }