Ejemplo n.º 1
0
        public void OnPreprocessBuild(BuildReport report)
        {
            UniBufConfig config = UniBufHelper.GetConfig();
            bool         isTest =
                (report.summary.options & BuildOptions.IncludeTestAssemblies) == BuildOptions.IncludeTestAssemblies;

            var typeModel = TypeModelFactory.CreateTypeModel(UnityAssembliesUtils.GetAllRuntimeTypes(isTest));

            if (config.AutoCompileModel)
            {
                UniBufHelper.CompileModel(typeModel);
            }

            if (config.AutoGenerateProtoFile)
            {
                UniBufHelper.GenerateProtoFile(typeModel, config.ProtoFilePath);
            }
        }
Ejemplo n.º 2
0
 private RuntimeTypeModel GetTypeModel()
 {
     return(TypeModelFactory.CreateTypeModel(UnityAssembliesUtils.GetAllRuntimeTypes(false)));
 }