private static void PostScreenPromptVisibility(bool isVisible) { if (isVisible) { MaterialHelper.MakeGraphicChildrenDrawOnTop(Locator.GetPromptManager().gameObject); } }
private static void PostDialogueOptionAwake(DialogueOptionUI __instance) { var text = __instance.GetComponentInChildren <Text>(); var collider = __instance.gameObject.AddComponent <BoxCollider>(); var rectTransform = text.GetComponent <RectTransform>(); var thickness = 10f; var height = 40; var width = rectTransform.rect.width; collider.size = new Vector3(width, height, thickness); collider.center = new Vector3(0, -height * 0.5f, thickness * 0.5f); MaterialHelper.MakeGraphicChildrenDrawOnTop(__instance.gameObject); }
private void SetUpCanvas() { _canvas = new GameObject().AddComponent <Canvas>(); _canvas.renderMode = RenderMode.WorldSpace; var followTarget = _canvas.gameObject.AddComponent <FollowTarget>(); _canvas.transform.localScale = Vector3.one * 0.0015f; followTarget.target = Locator.GetPlayerCamera().transform; followTarget.localPosition = Vector3.forward * 4; followTarget.rotationSmoothTime = 0.5f; followTarget.positionSmoothTime = 0.5f; _canvas.gameObject.AddComponent <ConditionalRenderer>().getShouldRender = ShouldRender; SetUpBackground(); SetUpText(); MaterialHelper.MakeGraphicChildrenDrawOnTop(_canvas.gameObject); LayerHelper.ChangeLayerRecursive(_canvas.gameObject, LayerMask.NameToLayer("UI")); }
private static void PostStartConversation() { MaterialHelper.MakeGraphicChildrenDrawOnTop(_canvasTransform.gameObject); }