Editor Module for Game Gem?

0

Trying to see if there's a way to make a game gem also an editor gem. Tried adding "EditorModule": true to my gem.json and adding an editor waf_file and modifying the wscript but it doesnt seem to add a <GameName>.Editor solution to the VS Solution.

demandé il y a 6 ans193 vues
7 réponses
0
Réponse acceptée

Try sticking to V3 of the Gem and remove the Modules property until the docs go live for Gem V4 :)

répondu il y a 6 ans
0

Hello @REDACTEDUSER

Have you tried running lmbr_waf configure after making the changes? Also make sure to have your code stored under an Editor folder similar to how Editor Gems do this :)

répondu il y a 6 ans
0

Yep, multiple times. Nothing really shows up under the <GameName> folder in the solution. so none of this:

<GameName>/
├── <GameName>
└── <GameName>.Editor
répondu il y a 6 ans
0

I tested it out and it worked for me so it's weird that it doesn't for you.

The file that I have is: myeditorgem_editor.waf_files and the file looks like this:

    {
"auto": {
"Editor": [
"Editor/Source/MyEditorGemModule.cpp",
"Editor/Source/alternativeaudiohelper.cpp",
"Editor/Source/alternativeaudiohelper.ui",
"Editor/Source/alternativeaudiohelper.h"
]
}
}

and my editor code is under the Editor/Source folder in my gem.

répondu il y a 6 ans
0

Huh... i didnt have the Editor/Source setup, i have it as the Source/Editor setup... wierd. Tried your setup, didnt work... gem.json:

  {
"Dependencies": [
<snip>
],
"GemFormatVersion": 4,
"Uuid": "95e41eeb9802469b8f7dd874f19720d9",
"Name": "OpenDiva",
"DisplayName": "OpenDiva",
"LumberyardVersion": [ "==1.11.1.0" ],
"Version": "0.1.0",
"Summary": "Open Source Hatsune Miku Project Diva",
"Tags": [ "Game" ],
"IconPath": "preview.png",
"IsGameGem": true,
"Modules": [
{
"Type": "GameModule"
}
],
"EditorModule": true
}

editor.waf_files:

  {
"none": {
"Source": [
]
},
"auto": {
"Editor/Include": [
],
"Editor/Source": [
],
"Editor/Source/Components": [
"Editor/Source/OpenDivaEditorSystemComponent.cpp",
"Editor/Source/OpenDivaEditorSystemComponent.h"
]
}
}

wscript:

    def build(bld):
bld.DefineGem(
# General
#file_list = [
#	'opendiva.waf_files',
#steamworks build files.
#this is ONLY used for the public steam builds.
#OpenDiva does not depend on steamworks to function and this can be safely commented out.
#'opendiva.steamworks.waf_files',
#],
platforms = ['win_x64', 'win_x64_vs2015', 'win_x64_vs2013','linux','darwin_x64'], #set to only compile on windows, linux, and mac
configurations = ['debug', 'profile', 'performance', 'release'], #no server compiling.
use = ['AzCore', 'AzGameFramework'],
includes = [ '.',
bld.Path('Code/CryEngine/CryCommon'),
bld.Path('Code/CryEngine/CryAction'),
bld.Path('Gems/Maestro/Code/Source') #required for CryMovie interfaces/classes.
#this is ONLY used for the public steam builds.
#OpenDiva does not depend on steamworks to function and this can be safely commented out.
#bld.Path('OpenDiva/Gem/Code/Source/Core/Steamworks/steam')
],
#this is ONLY used for the public steam builds.
#OpenDiva does not depend on steamworks to function and this can be safely commented out.
defines = [
#'STEAMWORKS',
],
#==============================
# Windows
#==============================
win_defines = [
'WX_DISABLE', #custom define, used to bypass /WX warnings as errors.
'NOMINMAX' #disable windows.h min/max definitions.
],
debug_win_linkflags = [ '/VERBOSE:LIB' ],
#usage of openmp is to parallel process precalculations.
#NOTE! NEVER EVER USE OPENMP IN A RENDER THREAD! Spikes cpu usage like crazy!
win_cflags = [ '/openmp' ],
win_cxxflags = [ '/openmp' ],
win_lib = [
'gdi32',
#this is ONLY used for the public steam builds.
#OpenDiva does not depend on steamworks to function and this can be safely commented out.
#'steam_api64'
],
win_libpath = [
#this is ONLY used for the public steam builds.
#OpenDiva does not depend on steamworks to function and this can be safely commented out.
#bld.Path('Code/OpenDiva/Game/Core/Steamworks/redistributable_bin/win64')
],
win_features = ['crcfix'],
#==============================
# Linux
#==============================
#usage of openmp is to parallel process precalculations.
#NOTE! NEVER EVER USE OPENMP IN A RENDER THREAD! Spikes cpu usage like crazy!
linux_cflags = [ '-fopenmp' ],
linux_cxxflags = [ '-fopenmp' ],
linux_lib = [
#this is ONLY used for the public steam builds.
#OpenDiva does not depend on steamworks to function and this can be safely commented out.
#'steam_api',
],
linux_libpath = [
#bld.Path('Code/OpenDiva/Game/Core/Steamworks/redistributable_bin'),
],
#==============================
# Darwin
#==============================
darwin_file_list = [
'opendiva_mac.waf_files'
],
#usage of openmp is to parallel process precalculations.
#NOTE! NEVER EVER USE OPENMP IN A RENDER THREAD! Spikes cpu usage like crazy!
darwin_cflags = [ '-fopenmp' ],
darwin_cxxflags = [ '-fopenmp' ],
darwin_lib = [
#this is ONLY used for the public steam builds.
#OpenDiva does not depend on steamworks to function and this can be safely commented out.
#'steam_api',
],
darwin_libpath = [
#bld.Path('Code/OpenDiva/Game/Core/Steamworks/redistributable_bin'),
],
# Platform Specific
#android_use = ['AndroidLauncher'],
# ==============================
# iOS
# 'ios_output_file_name' must match both
# 'executable_name' in 'project.json' and
# 'Executable file' in '../Resources/IOSLauncher/Info.plist'
# ==============================
#ios_file_list = ['opendiva_ios.waf_files'],
# ==============================
# AppleTV
# 'appletv_output_file_name' must match both
# 'executable_name' in 'project.json' and
# 'Executable file' in '../Resources/AppleTVLauncher/Info.plist'
# ==============================
#appletv_file_list = ['opendiva_appletv.waf_files'],
# Testing
test_all_file_list = ['opendiva_tests.waf_files'],
# Add additional custom build options here
# editor
editor = dict(
features = [
'qt5'
],
use = [
'AzToolsFramework',
'AzQtComponents',
'EditorCore',
'EditorUI_QT',
'EditorCommon'
],
includes = [
bld.Path('Code/CryEngine/CryCommon'),
bld.Path('Code/Sandbox'),
bld.Path('Code/Sandbox/Editor'),
bld.Path('Code/Sandbox/Editor/Include'),
bld.Path('Code/Sandbox/Plugins/EditorCommon')
],
uselib =[
'QT5CORE',
'QT5GUI',
'QT5WIDGETS'
],
defines = [
'OPENDIVA_EDITOR'
]
),
)
répondu il y a 6 ans
0

oh! i think i found the v4 definition!

    {
"GemFormatVersion": 4,
"Uuid": "f910686b6725452fbfc4671f95f733c6",
"Name": "Camera",
"Version": "0.1.0",
"DisplayName": "Camera",
"Tags": ["Camera"],
"Summary": "The Camera Gem includes a basic camera component that defines a frustum for runtime rendering.",
"IconPath": "preview.png",
"Modules": [
{
"Type": "GameModule"
},
{
"Name": "Editor",
"Type": "EditorModule",
"Extends": "GameModule"
}
]
}

That might be it!

répondu il y a 6 ans
0

That worked!

répondu il y a 6 ans

Cette publication est fermée : l'ajout de nouvelles réponses, commentaires et votes est désactivé.