Example #1
0
        internal void InitializeGame()
        {
            Localization.LoadLocalizations(PlayerPrefs.GetString("Culture", "en-US"));
            SerializationFileAccess.SetAccessor(new ContentFileAccessor());
            Input.Init();
            Facade.Init();

            ContentManager.LoadPlugins();
            ContentManager.InitializeContent();
            InterceptLogs();

            _hasStartedUp = true;
        }
        public override void Assemble(object obj, IAssignableMemberInfo member, ValueModel model, Type expectedType, AssemblyContext context)
        {
            if (!ValueModel.IsNull(model))
            {
                if (model is PathModel pathModel)
                {
                    UnityEngine.Object value = (UnityEngine.Object)SerializationFileAccess.LoadObjectFromFile(pathModel.Path, expectedType);

                    member.SetValue(obj, value);
                    return;
                }
                throw new InvalidOperationException(nameof(model) + " must be a " + nameof(PathModel));
            }
        }