void Start() { if (this.IsSharedUpdater(this) && m_Preferences == null) { m_Preferences = new Preferences(); // Share one preferences object across all instances foreach (var linkedObject in linkedObjects) { ((SelectionTool)linkedObject).m_Preferences = m_Preferences; } } m_NormalRayColor = this.GetDefaultRayColor(rayOrigin); m_MultiselectRayColor = m_NormalRayColor; m_MultiselectRayColor = MaterialUtils.HueShift(m_MultiselectRayColor, k_MultiselectHueShift); tooltipTarget = ObjectUtils.CreateEmptyGameObject("SelectionTool Tooltip Target", rayOrigin).transform; tooltipTarget.localPosition = this.GetDeviceType() == DeviceType.Oculus ? k_TouchTooltipPosition : k_ViveTooltipPosition; tooltipTarget.localRotation = k_TooltipRotation; m_BlockSelectCube = ObjectUtils.Instantiate(m_BlockSelectCube, transform); m_BlockSelectCube.SetActive(false); m_BlockSelectCubeRenderer = m_BlockSelectCube.GetComponent <Renderer>(); m_BlockSelectSphere = ObjectUtils.Instantiate(m_BlockSelectSphere, transform); m_BlockSelectSphere.SetActive(false); InputUtils.GetBindingDictionaryFromActionMap(m_ActionMap, m_Controls); }
void Start() { m_NormalRayColor = this.GetDefaultRayColor(rayOrigin); m_MultiselectRayColor = m_NormalRayColor; m_MultiselectRayColor = MaterialUtils.HueShift(m_MultiselectRayColor, k_MultiselectHueShift); tooltipTarget = ObjectUtils.CreateEmptyGameObject("SelectionTool Tooltip Target", rayOrigin).transform; tooltipTarget.localPosition = k_TooltipPosition; tooltipTarget.localRotation = k_TooltipRotation; }