EnsureExecutedInMainThread() публичный Метод

public EnsureExecutedInMainThread ( System.Action action ) : void
action System.Action
Результат void
Пример #1
0
        public ModelMesh(GameMode gameMode, Assimp.Scene assimpScene, Assimp.Mesh assimpMesh, string modelDirectory)
        {
            var geometryData = GenerateGeometryDataFromAssimpMesh(assimpMesh);

            gameMode.EnsureExecutedInMainThread(() => Mesh = new Mesh(gameMode.GraphicsDevice, geometryData));
            Material = GenerateMaterialFromMesh(assimpMesh.MaterialIndex, gameMode, assimpScene, modelDirectory);
        }
Пример #2
0
        public ModelMesh(GameMode gameMode, Assimp.Scene assimpScene, Assimp.Mesh assimpMesh, string modelDirectory)
        {
            var geometryData = GenerateGeometryDataFromAssimpMesh(assimpMesh);

            gameMode.EnsureExecutedInMainThread(() => Mesh = new Mesh(gameMode.GraphicsDevice, geometryData));
            Material = GenerateMaterialFromMesh(assimpMesh.MaterialIndex, gameMode, assimpScene, modelDirectory);
        }