fairygui / fairygui-unreal Goto Github PK
View Code? Open in Web Editor NEWA flexible UI framework for Unreal Engine
License: MIT License
A flexible UI framework for Unreal Engine
License: MIT License
editor下运行demo和我自己的工程第一次都会错乱,后面启动就正常了,如果用独立进程运行就一直都不行
普通按钮正常
再编辑器里设置好遮罩后,编辑器运行没问题。但是在UE里遮罩失效。
使用PuerTS生成d.ts后,在GWindow处会出现报错,原因是OnDragStart出现重定义(与GObject中的OnDragStart重名):
TypeScript/Typing/ue/ue.d.ts:62746:9 - error TS2416: Property 'OnDragStart' in type 'GWindow' is not assignable to the same property in base type 'GComponent'.
Type '(Context: EventContext) => void' is missing the following properties from type '$MulticastDelegate<(EventContext: EventContext) => void>': Add, Remove, Broadcast
62746 OnDragStart(Context: EventContext): void;
~~~~~~~~~~~
TypeScript/Typing/ue/ue.d.ts:62746:9 - error TS2425: Class 'GComponent' defines instance member property 'OnDragStart', but extended class 'GWindow' defines it as instance member function.
62746 OnDragStart(Context: EventContext): void;
问题:GButton的缩放动画(eg:点击时将控件大小缩放到0.8x)会影响实际点击区域,造成点击边缘时,按下时在响应区域内抬起时由于区域缩小光标在点击区域外,未触发Click事件。
解决方案:
UGButton::ConstructExtension函数中,改为设置子物体的Pivot:
for (auto child : Children) {
child->SetPivot(FVector2D(0.5f, 0.5f), IsPivotAsAnchor());
}
UGButton::SetState函数中,将SetScale函数相关操作改为缩放子物体:
for (auto child : Children) {
child->SetScale(child->GetScale() * DownEffectValue);
}
不紧随UE版本更新,不知道SDK支持UE有什么意义
在一个界面切换到另一个界面后然后修改窗体大小会导致崩溃,在GList.cpp 1700行,尝试修改为 ItemRenderer.ExecuteIfBound(curIndex % NumItems, ii.Obj);就没有崩溃的问题了
`
[2021.05.14-01.45.15:378][382]CrashToolLog: Fatal error!
Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x0000000000000000
0x00007ffa7271d41c UE4Editor-FairyGUI.dll!TBaseUFunctionDelegateInstance<UObject,void __cdecl(int,UGObject *),FDefaultDelegateUserPolicy>::Execute() [F:\UnrealEngine-4.26.2\Engine\Source\Runtime\Core\Public\Delegates\DelegateInstancesImpl.h:149]
0x00007ffa72730864 UE4Editor-FairyGUI.dll!UGList::HandleScroll2() [F:\UE4Projects\Dental3D4.26\Plugins\FairyGUI\Source\FairyGUI\Private\UI\GList.cpp:1701]
0x00007ffa727316ee UE4Editor-FairyGUI.dll!UGList::HandleScroll() [F:\UE4Projects\Dental3D4.26\Plugins\FairyGUI\Source\FairyGUI\Private\UI\GList.cpp:1403]
0x00007ffa90675a6b UE4Editor-Engine.dll!FTimerUnifiedDelegate::Execute() [F:\UnrealEngine-4.26.2\Engine\Source\Runtime\Engine\Public\TimerManager.h:51]
0x00007ffa906efec9 UE4Editor-Engine.dll!FTimerManager::Tick() [F:\UnrealEngine-4.26.2\Engine\Source\Runtime\Engine\Private\TimerManager.cpp:881]
0x00007ffa8fd76534 UE4Editor-Engine.dll!UWorld::Tick() [F:\UnrealEngine-4.26.2\Engine\Source\Runtime\Engine\Private\LevelTick.cpp:1524]
0x00007ffa93221903 UE4Editor-UnrealEd.dll!UEditorEngine::Tick() [F:\UnrealEngine-4.26.2\Engine\Source\Editor\UnrealEd\Private\EditorEngine.cpp:1720]
0x00007ffa93b5d6b6 UE4Editor-UnrealEd.dll!UUnrealEdEngine::Tick() [F:\UnrealEngine-4.26.2\Engine\Source\Editor\UnrealEd\Private\UnrealEdEngine.cpp:426]
0x00007ff7c3fa9bb5 UE4Editor.exe!FEngineLoop::Tick() [F:\UnrealEngine-4.26.2\Engine\Source\Runtime\Launch\Private\LaunchEngineLoop.cpp:4836]
0x00007ff7c3fc118c UE4Editor.exe!GuardedMain() [F:\UnrealEngine-4.26.2\Engine\Source\Runtime\Launch\Private\Launch.cpp:169]
0x00007ff7c3fc126a UE4Editor.exe!GuardedMainWrapper() [F:\UnrealEngine-4.26.2\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:137]
0x00007ff7c3fd521d UE4Editor.exe!WinMain() [F:\UnrealEngine-4.26.2\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:268]
0x00007ff7c3fd7f3a UE4Editor.exe!__scrt_common_main_seh() [d:\A01_work\6\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288]
0x00007ffb300e7034 KERNEL32.DLL!UnknownFunction []
0x00007ffb30222651 ntdll.dll!UnknownFunction []`
UE4Editor-Engine.dll!FTimerManager::InternalSetTimerForNextTick(FTimerUnifiedDelegate && InDelegate) 行 523 C++
[内联框架] UE4Editor-FairyGUI.dll!FTimerManager::SetTimerForNextTick(const TDelegate<void cdecl(void),FDefaultDelegateUserPolicy> &) 行 242 C++
UE4Editor-FairyGUI.dll!UFairyApplication::DelayCall<UGComponent,bool>(FTimerHandle & InOutHandle, UGComponent * InUserObject, void(UGComponent::*)(bool) inTimerMethod, bool <Vars_0>) 行 170 C++
UE4Editor-FairyGUI.dll!UGComponent::BuildNativeDisplayList(bool bImmediatelly) 行 707 C++
UE4Editor-FairyGUI.dll!UGComponent::ConstructFromResource(TArray<UGObject *,TSizedDefaultAllocator<32>> * ObjectPool, int PoolIndex) 行 1109 C++
UE4Editor-FairyGUI.dll!UGComponent::ConstructFromResource(TArray<UGObject *,TSizedDefaultAllocator<32>> * ObjectPool, int PoolIndex) 行 1013 C++
[内联框架] UE4Editor-FairyGUI.dll!UUIPackage::CreateObject(const TSharedPtr<FPackageItem,0> &) 行 284 C++
UE4Editor-FairyGUI.dll!UUIPackage::CreateObject(const FString & ResourceName, UObject * WorldContextObject) 行 274 C++
UE4Editor-FairyGUI.dll!UUIPackage::execCreateObject(UObject * Context, FFrame & Stack, void * const Z_Param__Result) 行 59 C++
UE4Editor-CoreUObject.dll!UFunction::Invoke(UObject * Obj, FFrame & Stack, void * const Z_Param__Result) 行 5588 C++
UE4Editor-CoreUObject.dll!UObject::ProcessEvent(UFunction * Function, void * Parms) 行 1992 C++
UE4Editor-JsEnv.dll!puerts::FFunctionTranslator::Call(v8::Isolate * Isolate, v8::Localv8::Context & Context, const v8::FunctionCallbackInfov8::Value & Info) 行 124 C++
UE4Editor-JsEnv.dll!puerts::FFunctionTranslator::Call(const v8::FunctionCallbackInfov8::Value & Info) 行 89 C++
[外部代码]
UE4Editor-JsEnv.dll!puerts::FFunctionTranslator::CallJs(v8::Isolate * Isolate, v8::Localv8::Context & Context, v8::Localv8::Function JsFunction, v8::Localv8::Value This, void * Params) 行 178 C++
UE4Editor-JsEnv.dll!puerts::FJsEnvImpl::InvokeJsCallabck(UDynamicDelegateProxy * Proxy, void * Parms) 行 1422 C++
UE4Editor-JsEnv.dll!UDynamicDelegateProxy::ProcessEvent(UFunction * formal, void * Parms) 行 20 C++
[内联框架] UE4Editor-View.dll!FGameModeStartDelegate_DelegateWrapper(const TScriptDelegate &) 行 26 C++
[内联框架] UE4Editor-View.dll!FGameModeStartDelegate::ExecuteIfBound(const int InParam1) 行 26 C++
UE4Editor-View.dll!ACoreGameMode::StartPlay() 行 16 C++
UE4Editor-Engine.dll!UWorld::BeginPlay() 行 4342 C++
UE4Editor-Engine.dll!UEngine::LoadMap(FWorldContext & WorldContext, FURL URL, UPendingNetGame * Pending, FString & Error) 行 13098 C++
UE4Editor-Engine.dll!UEngine::Browse(FWorldContext & WorldContext, FURL URL, FString & Error) 行 12303 C++
UE4Editor-Engine.dll!UEngine::TickWorldTravel(FWorldContext & Context, float DeltaSeconds) 行 12501 C++
UE4Editor-UnrealEd.dll!UEditorEngine::Tick(float DeltaSeconds, bool bIdleMode) 行 1692 C++
UE4Editor-UnrealEd.dll!UUnrealEdEngine::Tick(float DeltaSeconds, bool bIdleMode) 行 426 C++
UE4Editor.exe!FEngineLoop::Tick() 行 4836 C++
[内联框架] UE4Editor.exe!EngineTick() 行 62 C++
UE4Editor.exe!GuardedMain(const wchar_t * CmdLine) 行 169 C++
UE4Editor.exe!WinMain(HINSTANCE * hInInstance, HINSTANCE * hPrevInstance, char * __formal, int nCmdShow) 行 257 C++
[外部代码]
1 鼠标移出游戏窗口
2 点击一下屏幕(任意地方)
3 鼠标重新返回游戏窗口,游戏获取不到鼠标焦点了
如果使用Tab键切换回游戏窗口可以获取焦点
static UGWindow* CreateWindow(const FString& PackageName, const FString& ResourceName, UObject* WorldContextObject);
这个函数。
如果在引用了一些用到winapi的库(我用到的是raknet),这个函数会导致编译错误。我将其改名CreateGWindow可以解决
In file included from C:/Projects/evh/Intermediate/Build/Android/evh/Development/FairyGUI/Module.FairyGUI.cpp:41:
UATHelper: Packaging (Android (ETC2)): C:/Projects/evh/Plugins/FairyGUI-unreal/Source/FairyGUI/Private/UI/GObject.cpp(638,9): warning: UProperty has been renamed to FProperty Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile. [-W#pragma-messages]
UATHelper: Packaging (Android (ETC2)): UProperty* Property = GetClass()->FindPropertyByName(FName(*FString("On").Append(EventType.ToString())));
UATHelper: Packaging (Android (ETC2)): ^
UATHelper: Packaging (Android (ETC2)): C:/Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\CoreUObject\Public\UObject\DefineUPropertyMacros.h(8,20): note: expanded from macro 'UProperty'
UATHelper: Packaging (Android (ETC2)): #define UProperty DEPRECATED_MACRO(4.25, "UProperty has been renamed to FProperty") FProperty
UATHelper: Packaging (Android (ETC2)): ^
UATHelper: Packaging (Android (ETC2)): C:/Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\GenericPlatform\GenericPlatformCompilerPreSetup.h(88,45): note: expanded from macro 'DEPRECATED_MACRO'
UATHelper: Packaging (Android (ETC2)): #define DEPRECATED_MACRO(Version, Message) EMIT_CUSTOM_WARNING(Message " Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.")
UATHelper: Packaging (Android (ETC2)): ^
UATHelper: Packaging (Android (ETC2)): C:/Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\GenericPlatform\GenericPlatformCompilerPreSetup.h(84,3): note: expanded from macro 'EMIT_CUSTOM_WARNING'
UATHelper: Packaging (Android (ETC2)): EMIT_CUSTOM_WARNING_AT_LINE(LINE, Warning)
UATHelper: Packaging (Android (ETC2)): ^
UATHelper: Packaging (Android (ETC2)): C:/Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\Clang\ClangPlatformCompilerPreSetup.h(172,3): note: expanded from macro 'EMIT_CUSTOM_WARNING_AT_LINE'
UATHelper: Packaging (Android (ETC2)): _Pragma(PREPROCESSOR_TO_STRING(message(Warning)))
UATHelper: Packaging (Android (ETC2)): ^
UATHelper: Packaging (Android (ETC2)): (7,2): note: expanded from here
UATHelper: Packaging (Android (ETC2)): message("UProperty has been renamed to FProperty" " Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.")
UATHelper: Packaging (Android (ETC2)): ^
UATHelper: Packaging (Android (ETC2)): In file included from C:/Projects/evh/Intermediate/Build/Android/evh/Development/FairyGUI/Module.FairyGUI.cpp:62:
UATHelper: Packaging (Android (ETC2)): C:/Projects/evh/Plugins/FairyGUI-unreal/Source/FairyGUI/Private/UIPackageAsset.cpp(4,23): error: out-of-line definition of 'GetAssetRegistryTags' does not match any declaration in 'UUIPackageAsset'
UATHelper: Packaging (Android (ETC2)): void UUIPackageAsset::GetAssetRegistryTags(TArray& OutTags) const
UATHelper: Packaging (Android (ETC2)): ^~~~~~~~~~~~~~~~~~~~
UATHelper: Packaging (Android (ETC2)): In file included from C:/Projects/evh/Intermediate/Build/Android/evh/Development/FairyGUI/Module.FairyGUI.cpp:83:
UATHelper: Packaging (Android (ETC2)): C:/Projects/evh/Plugins/FairyGUI-unreal/Source/FairyGUI/Private/Widgets/NTexture.cpp(15,24): error: no member named 'CompressionNone' in 'UTexture2D'; did you mean 'CompressionYCoCg'?
UATHelper: Packaging (Android (ETC2)): NativeTexture->CompressionNone = true;
UATHelper: Packaging (Android (ETC2)): ^~~~~~~~~~~~~~~
UATHelper: Packaging (Android (ETC2)): CompressionYCoCg
UATHelper: Packaging (Android (ETC2)): C:/Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Engine\Classes\Engine\Texture.h(839,8): note: 'CompressionYCoCg' declared here
UATHelper: Packaging (Android (ETC2)): uint8 CompressionYCoCg : 1;
UATHelper: Packaging (Android (ETC2)): ^
UATHelper: Packaging (Android (ETC2)): In file included from C:/Projects/evh/Intermediate/Build/Android/evh/Development/FairyGUI/Module.FairyGUI.cpp:83:
UATHelper: Packaging (Android (ETC2)): C:/Projects/evh/Plugins/FairyGUI-unreal/Source/FairyGUI/Private/Widgets/NTexture.cpp(16,24): error: no member named 'MipGenSettings' in 'UTexture2D'
UATHelper: Packaging (Android (ETC2)): NativeTexture->MipGenSettings = TMGS_NoMipmaps;
UATHelper: Packaging (Android (ETC2)): ~~~~~~~~~~~~~ ^
UATHelper: Packaging (Android (ETC2)): 1 warning and 3 errors generated.
PackagingResults: Warning: UProperty has been renamed to FProperty Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile. [-W#pragma-messages]
PackagingResults: Error: out-of-line definition of 'GetAssetRegistryTags' does not match any declaration in 'UUIPackageAsset'
PackagingResults: Error: no member named 'CompressionNone' in 'UTexture2D'; did you mean 'CompressionYCoCg'?
PackagingResults: Error: no member named 'MipGenSettings' in 'UTexture2D'
什么时候出一个UE5的版本,坐等ue5
父类是虚构造,子类必须得有虚析构函数
[1/3] Module.FairyGUI.cpp
[2021.03.06-09.07.16:052][891]UATHelper: Packaging (Linux): In file included from C:/Projects/evh/Intermediate/Build/Linux/B4D820EA/evhServer/Development/FairyGUI/Module.FairyGUI.cpp:41:
[2021.03.06-09.07.16:052][891]UATHelper: Packaging (Linux): C:\Projects\evh\Plugins\FairyGUI-unreal\Source\FairyGUI\Private\UI\GObject.cpp(620,67): error: '&&' within '||' [-Werror,-Wlogical-op-parentheses]
[2021.03.06-09.07.16:053][891]UATHelper: Packaging (Linux): return Delegate.Func.IsBound() || Delegate.DynFunc != nullptr && Delegate.DynFunc->IsBound();
[2021.03.06-09.07.16:053][891]UATHelper: Packaging (Linux): ~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[2021.03.06-09.07.16:053][891]UATHelper: Packaging (Linux): C:\Projects\evh\Plugins\FairyGUI-unreal\Source\FairyGUI\Private\UI\GObject.cpp(620,67): note: place parentheses around the '&&' expression to silence this warning
[2021.03.06-09.07.16:053][891]PackagingResults: Error: '&&' within '||' [-Werror,-Wlogical-op-parentheses]
[2021.03.06-09.07.16:053][891]UATHelper: Packaging (Linux): return Delegate.Func.IsBound() || Delegate.DynFunc != nullptr && Delegate.DynFunc->IsBound();
[2021.03.06-09.07.16:053][891]UATHelper: Packaging (Linux): ^
[2021.03.06-09.07.16:053][891]UATHelper: Packaging (Linux): ( )
[2021.03.06-09.07.16:053][891]UATHelper: Packaging (Linux): C:\Projects\evh\Plugins\FairyGUI-unreal\Source\FairyGUI\Private\UI\GObject.cpp(638,9): warning: UProperty has been renamed to FProperty Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile. [-W#pragma-messages]
[2021.03.06-09.07.16:053][891]UATHelper: Packaging (Linux): UProperty* Property = GetClass()->FindPropertyByName(FName(*FString("On").Append(EventType.ToString())));
[2021.03.06-09.07.16:053][891]UATHelper: Packaging (Linux): ^
[2021.03.06-09.07.16:053][891]UATHelper: Packaging (Linux): C:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\CoreUObject\Public\UObject\DefineUPropertyMacros.h(8,20): note: expanded from macro 'UProperty'
[2021.03.06-09.07.16:054][891]UATHelper: Packaging (Linux): #define UProperty DEPRECATED_MACRO(4.25, "UProperty has been renamed to FProperty") FProperty
[2021.03.06-09.07.16:054][891]UATHelper: Packaging (Linux): ^
[2021.03.06-09.07.16:054][891]UATHelper: Packaging (Linux): C:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\GenericPlatform\GenericPlatformCompilerPreSetup.h(88,45): note: expanded from macro 'DEPRECATED_MACRO'
[2021.03.06-09.07.16:054][891]UATHelper: Packaging (Linux): #define DEPRECATED_MACRO(Version, Message) EMIT_CUSTOM_WARNING(Message " Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.")
[2021.03.06-09.07.16:054][891]UATHelper: Packaging (Linux): ^
[2021.03.06-09.07.16:054][891]UATHelper: Packaging (Linux): C:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\GenericPlatform\GenericPlatformCompilerPreSetup.h(84,3): note: expanded from macro 'EMIT_CUSTOM_WARNING'
[2021.03.06-09.07.16:054][891]UATHelper: Packaging (Linux): EMIT_CUSTOM_WARNING_AT_LINE(LINE, Warning)
[2021.03.06-09.07.16:054][891]UATHelper: Packaging (Linux): ^
[2021.03.06-09.07.16:054][891]UATHelper: Packaging (Linux): C:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\Clang\ClangPlatformCompilerPreSetup.h(172,3): note: expanded from macro 'EMIT_CUSTOM_WARNING_AT_LINE'
[2021.03.06-09.07.16:054][891]UATHelper: Packaging (Linux): _Pragma(PREPROCESSOR_TO_STRING(message(Warning)))
[2021.03.06-09.07.16:054][891]UATHelper: Packaging (Linux): ^
[2021.03.06-09.07.16:055][891]UATHelper: Packaging (Linux): (99,2): note: expanded from here
[2021.03.06-09.07.16:055][891]UATHelper: Packaging (Linux): message("UProperty has been renamed to FProperty" " Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.")
[2021.03.06-09.07.16:055][891]UATHelper: Packaging (Linux): ^
[2021.03.06-09.07.16:055][891]UATHelper: Packaging (Linux): 1 warning and 1 error generated.
如题,在UE中导入fgui资产后,字体不对,请问该如何映射?
试图在Editor中Add Package,然后发现有个assertion failed
FairyGUI/Private/UI/UIPackage.cpp
line77:
verifyf(World->IsGameWorld(), TEXT("Not a Game World?"));
PackagingResults: Error: delete called on non-final 'FChildHitTest' that has virtual functions but non-virtual destructor [-Werror,-Wdelete-non-abstract-non-virtual-dtor]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.