private IEnumerator lateAwake() { yield return(null); // Add ourselves after TouchManager finished adding layers in order manager.AddLayer(this, -1, false); }
private void createCameraLayer() { if (layerManager.LayerCount == 0 && shouldCreateCameraLayer) { if (Camera.main != null) { //if (Application.isEditor) // Debug.Log( // "[TouchScript] No touch layers found, adding StandardLayer for the main camera. (this message is harmless)"); var layer = Camera.main.gameObject.AddComponent <StandardLayer>(); layerManager.AddLayer(layer); } } }