private void LoadGamePrototype(GamePrototypeLoadMessage message)
 {
     _prototypeManager.LoadString(message.PrototypeData);
     _prototypeManager.Resync();
     _localizationManager.ReloadLocalizations();
     GamePrototypeLoaded?.Invoke();
     Logger.InfoS("adminbus", "Loaded adminbus prototype data.");
 }
Esempio n. 2
0
        public void TestLoadString()
        {
            manager.LoadString(LoadStringDocument);

            var prototype = manager.Index <EntityPrototype>(LoadStringTestDummyId);

            Assert.That(prototype.Name, Is.EqualTo(LoadStringTestDummyId));
        }
Esempio n. 3
0
        public void Setup()
        {
            var factory = IoCManager.Resolve <IComponentFactory>();

            factory.RegisterClass <TestBasicPrototypeComponent>();
            factory.RegisterClass <PointLightComponent>();

            IoCManager.Resolve <ISerializationManager>().Initialize();
            manager = IoCManager.Resolve <IPrototypeManager>();
            manager.LoadString(DOCUMENT);
            manager.Resync();
        }