void Start() { // Set up SerializableModel's sModels = ScriptableObject.CreateInstance <SerializeModels>(); sModels.Init(); sModels.prefabs[0] = modelPrefab; sPaintStrokes = ScriptableObject.CreateInstance <SerializePaintStrokes>(); sPaintStrokes.Init(); sPeople = ScriptableObject.CreateInstance <SerializePeople>(); sPeople.Init(); InitUI(); currentMapId = ""; mappingStarted = false; hasLocalized = false; mPNPlaneManager = GameObject.FindWithTag("PNPlaneManager").GetComponent <PlacenoteARGeneratePlane>(); Input.location.Start(); mSession = UnityARSessionNativeInterface.GetARSessionNativeInterface(); StartARKit(); FeaturesVisualizer.EnablePointcloud(); LibPlacenote.Instance.RegisterListener(this); paintManager = GameObject.FindWithTag("PaintManager").GetComponent <PaintManager>(); ARPlanePaintingStatus = mPlaneDetectionToggle.GetComponent <Toggle>().isOn; paintManager.ARPlanePainting = ARPlanePaintingStatus; paintManager.paintOnTouch = !ARPlanePaintingStatus; // TODO: make an enum to replace multiple bools }