private void ConstructLocalization(MetaFactoryPackage package)
        {
            var metaLocalization = new MetaLocalization(_metaPrefab);

            package.EventReceivers.Add(metaLocalization);
            package.MetaContext.Add(metaLocalization);

            // Set localizer if no Localization Settings to set localizer
            var settings = _metaPrefab.GetComponent <MetaLocalizationSettings>();

            if (settings == null)
            {
                metaLocalization.SetLocalizer(typeof(SlamLocalizer));
            }
        }
示例#2
0
        private void ConstructLocalization(MetaFactoryPackage package)
        {
            // TODO: deprecate Localizer interface in favor of native tracking implemenation interfaces
            // (allow external developers to implement a tracking interface for the compositor)
            var metaLocalization = new MetaLocalization();

            package.EventReceivers.Add(metaLocalization);
            package.MetaContext.Add(metaLocalization);

            metaLocalization.SetLocalizer(_isHeadsetConnected ? typeof(SlamLocalizer) : typeof(MouseLocalizer));

            //Sensor Messages
            MetaEventReceivingSensorFailureMessages messages = new MetaEventReceivingSensorFailureMessages();

            package.EventReceivers.Add(messages);
            package.MetaContext.Add(messages);
        }