void Awake() { if (instance != null) { throw new Exception("There already exists one PBKeyframeManager in the scene!!!"); } instance = this; }
private void Init() { if (isInit) { return; } RegisterSwipeEvent(); mPbKeyframeManager = gameObject.AddComponent <PBKeyframeManager>(); BlockCamera = transform.parent.Find("Camera").GetComponent <Camera>(); if (IsShowStepHighlight) { HighlightingRenderer highlightingRenderer = BlockCamera.gameObject.AddComponent <HighlightingRenderer>(); highlightingRenderer.downsampleFactor = 2; highlightingRenderer.iterations = 5; highlightingRenderer.blurMinSpread = 1; highlightingRenderer.blurSpread = 0; highlightingRenderer.blurIntensity = 0.34f; } isInit = true; }
void OnDestroy() { instance = null; }