MizunagiKB / gd_cubism

Unofficial Live2D Player for Godot Engine
https://mizunagikb.github.io/gd_cubism/
Other
111 stars 17 forks source link

Module Not Detected as Plugin in Godot 4.2.1 #71

Closed Chigoma333 closed 3 months ago

Chigoma333 commented 3 months ago

Environment

Description

After following the official build instructions and successfully compiling Godot Engine with scons, I encounter an issue where the gd_cubism plugin is not recognized within the Godot editor. Although the build process indicates successful completion.

Upon starting Godot through the command line and opening the demo project, it shows warning messages related to Live2D Cubism Core initialization are displayed.

Inconsistent value (1) for DRI_PRIME. Should be < 1 (GPU devices count). Using: 0
OpenGL API 4.6 (Core Profile) Mesa 24.0.2-arch1.2 - Compatibility - Using Device: AMD - AMD Radeon RX 7900 XT (radeonsi, navi31, LLVM 17.0.6, DRM 3.57, 6.7.8-zen1-1-zen)

Editing project: /home/chigoma333/Desktop/Program/live2d-godor/gd_cubism/demo
Godot Engine v4.2.1.stable.arch_linux - https://godotengine.org
Vulkan API 1.3.274 - Forward+ - Using Vulkan Device #0: AMD - AMD Radeon RX 7900 XT (RADV NAVI31)

WARNING: [CSM][I]Live2D Cubism Core version: 05.00.0000 (83886080)
at: output (src/register_types.cpp:38)
WARNING: [CSM][I]CubismFramework::StartUp() is complete.
at: output (src/register_types.cpp:38)
WARNING: [CSM][I]CubismFramework::Initialize() is complete.
at: output (src/register_types.cpp:38) 

image

MizunagiKB commented 3 months ago

@Chigoma333

Regarding the Issue of Not Displaying in Project Settings / Plugins

GDCubism is developed as a GDExtension for the Godot Engine. Therefore, the loading control is not displayed in the Plugins settings, but is done in the following file:

This file is used by the Godot Engine at startup to locate where the extension library exists. The loading control of the GDExtension is done here.

Reasons for Warning Display and Suppression Method

The warning is output by the Live2D library used by GDCubism, and GDCubism controls it in _registertypes.cpp.

If you are concerned about the output, you can suppress it by changing the option.LoggingLevel set in the following location:

https://github.com/MizunagiKB/gd_cubism/blob/58ac8a61e246737aac8e3edfeff4f0d43ef12bad/src/register_types.cpp#L48

For example, the output can be completely suppressed by doing as follows:

option.LoggingLevel = Csm::CubismFramework::Option::LogLevel::LogLevel_Off;

Regarding this specification, in the current development branch 0.6, we have changed it to output only when DEBUG_ENABLED is specified.

https://github.com/MizunagiKB/gd_cubism/blob/990c0108298c6e9f81b3f4cd7b788a3ba8f4611a/src/register_types.cpp#L51-L55