private void Initialize() { if (initialized) { return; } initialized = true; drawArea = scrollView.content; m_canvas = GetComponentInParent <Canvas>(); nullPointerEventData = new PointerEventData(null); if (m_showTooltips) { TooltipListener = gameObject.AddComponent <TooltipListener>(); TooltipListener.Initialize(this); } GameObject poolParentGO = GameObject.Find(POOL_OBJECT_NAME); if (poolParentGO == null) { poolParentGO = new GameObject(POOL_OBJECT_NAME); DontDestroyOnLoad(poolParentGO); } poolParent = poolParentGO.transform; aliveInspectors++; for (int i = 0; i < settings.Length; i++) { if (!settings[i]) { continue; } VariableSet[] hiddenVariablesForTypes = settings[i].HiddenVariables; for (int j = 0; j < hiddenVariablesForTypes.Length; j++) { VariableSet hiddenVariablesSet = hiddenVariablesForTypes[j]; if (hiddenVariablesSet.Init()) { hiddenVariables.Add(hiddenVariablesSet); } } VariableSet[] exposedVariablesForTypes = settings[i].ExposedVariables; for (int j = 0; j < exposedVariablesForTypes.Length; j++) { VariableSet exposedVariablesSet = exposedVariablesForTypes[j]; if (exposedVariablesSet.Init()) { exposedVariables.Add(exposedVariablesSet); } } } RuntimeInspectorUtils.IgnoredTransformsInHierarchy.Add(drawArea); RuntimeInspectorUtils.IgnoredTransformsInHierarchy.Add(poolParent); #if ENABLE_INPUT_SYSTEM && !ENABLE_LEGACY_INPUT_MANAGER // On new Input System, scroll sensitivity is much higher than legacy Input system scrollView.scrollSensitivity *= 0.25f; #endif }
public void Initialize(TooltipListener tooltipListener, ITooltipContent tooltipContent) { this.tooltipListener = tooltipListener; this.tooltipContent = tooltipContent; }