Skip to main content

just_game_engine_editor 0.1.0-dev.2 copy "just_game_engine_editor: ^0.1.0-dev.2" to clipboard
just_game_engine_editor: ^0.1.0-dev.2 copied to clipboard

A level editor that runs inside your just_game_engine game while you develop it: scenes, inspector, 2D and 3D level design, timelines, tilesets, materials, an Asset Store.

example/lib/main.dart

import 'package:flutter/foundation.dart' show kDebugMode;
import 'package:flutter/material.dart';
import 'package:just_game_engine/just_game_engine.dart';
import 'package:just_game_engine_editor/just_game_engine_editor.dart';

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();

  final engine = Engine();
  // The editor attaches to a ready engine: its world and camera exist.
  await engine.initialize();
  // kDebugMode is a compile-time constant: a profile or release build drops
  // the editor and holds only the game (register returns null there too).
  final plugin = kDebugMode
      ? await JustGameEditorPlugin.register(engine: engine)
      : null;
  // The game loop drives the editor too: Play, autosave and the 3-D fly
  // keys all run on its frames.
  engine.start();

  runApp(_ExampleApp(engine: engine, plugin: plugin));
}

class _ExampleApp extends StatelessWidget {
  const _ExampleApp({required this.engine, required this.plugin});

  final Engine engine;
  final JustGameEditorPlugin? plugin;

  @override
  Widget build(BuildContext context) {
    // JustGameEngineEditor puts the editor overlay over the GameWidget and
    // routes focus between them. When plugin is null (release builds, or a
    // platform the editor does not run on) it is a plain GameWidget.
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        body: JustGameEngineEditor(
          engine: engine,
          plugin: plugin,
          showFPS: true,
          showTerminal: true,
        ),
      ),
    );
  }
}
1
likes
160
points
108
downloads
screenshot

Documentation

API reference

Publisher

verified publisherjustunknown.com

Weekly Downloads

A level editor that runs inside your just_game_engine game while you develop it: scenes, inspector, 2D and 3D level design, timelines, tilesets, materials, an Asset Store.

Homepage
Repository (GitHub)
View/report issues
Contributing

Topics

#game-engine #gamedev #level-editor #editor #game

License

BSD-3-Clause (license)

Dependencies

flutter, just_asset_store, just_debugger, just_editor_core, just_game_engine, just_signals, just_tiled

More

Packages that depend on just_game_engine_editor