gameframework_unity library

Unity Engine plugin for GameFramework

This plugin provides Unity-specific implementation of the game framework, allowing Flutter apps to embed and control Unity game engines.

Usage

import 'package:gameframework/gameframework.dart';
import 'package:gameframework_unity/gameframework_unity.dart';

// Initialize Unity plugin
void main() {
  WidgetsFlutterBinding.ensureInitialized();
  UnityEnginePlugin.initialize();
  runApp(MyApp());
}

// Use Unity in your widget tree
GameWidget(
  engineType: GameEngineType.unity,
  onEngineCreated: (controller) {
    print('Unity engine ready!');
  },
)

Classes

BatcherStatistics
Batching statistics.
UnityController
Unity-specific implementation of GameEngineController
UnityEngineFactory
Factory for creating Unity controllers
UnityEnginePlugin
Unity Engine Plugin for GameFramework
UnityMessageBatcher
Message batcher for high-frequency Unity communication.
UnityMessageThrottler
Message throttler for rate-limited communication.

Enums

ThrottleStrategy
Strategy for handling throttled messages.

Extensions

UnityControllerPerformance on UnityController
Extension methods for UnityController with performance utilities.

Functions

createUnityController(int viewId, GameEngineConfig config) → GameEngineController
Platform-specific controller creation for mobile/desktop