User avatar
hcpizzi
Site Admin
Posts: 236
Joined: 09 Feb 2012, 12:40

Re: Unreal Engine 4

12 Dec 2017, 11:59

I just pushed the code to GitHub. Please, let me know if you spot anything that's wrong.
 
null
Posts: 3
Joined: 12 Dec 2017, 04:34

Re: Unreal Engine 4

12 Dec 2017, 16:42

I just pushed the code to GitHub. Please, let me know if you spot anything that's wrong.
It would be cool, if you can start using releases on GitHub writing quick changelog, so it will be more clear what's going on without checking the forum.

Related links:
Docs - https://help.github.com/articles/creating-releases/
Example - https://github.com/tensorflow/tensorflow/releases

Thanks!
 
flyingtree
Posts: 31
Joined: 09 Jun 2017, 04:47

Re: Unreal Engine 4

13 Dec 2017, 02:54

I just pushed the code to GitHub. Please, let me know if you spot anything that's wrong.
@hcpizzi There are two bugs in the latest code.

First, when I open the TestLevel map(double click),editor crashed.
Assertion failed: IsValid() [File:c:\program files\epic games\ue_4.18\engine\source\runtime\core\public\Templates/SharedPointer.h] [Line: 793]

KERNELBASE
UE4Editor_ApplicationCore
UE4Editor_Core
UE4Editor_Core
UE4Editor_NoesisRuntime!TSharedPtr<NoesisTextBoxTextInputMethodContext,0>::ToSharedRef() [c:\program files\epic games\ue_4.18\engine\source\runtime\core\public\templates\sharedpointer.h:794]
UE4Editor_NoesisRuntime!UNoesisInstance::OnPreviewGotKeyboardFocus() [d:\cache\temp\noesisguiplugin20881\hostproject\plugins\noesisgui\source\noesisruntime\private\noesisinstance.cpp:465]
Noesis
Noesis
Noesis
Noesis
Noesis
Noesis
Noesis
Noesis
UE4Editor_NoesisRuntime!UNoesisInstance::Update() [d:\cache\temp\noesisguiplugin20881\hostproject\plugins\noesisgui\source\noesisruntime\private\noesisinstance.cpp:135]
UE4Editor_NoesisRuntime!UNoesisXaml::RenderThumbnail() [d:\cache\temp\noesisguiplugin20881\hostproject\plugins\noesisgui\source\noesisruntime\private\noesisxaml.cpp:125]
UE4Editor_NoesisEditor!UNoesisXamlThumbnailRenderer::Draw() [d:\cache\temp\noesisguiplugin20881\hostproject\plugins\noesisgui\source\noesiseditor\private\noesisxamlthumbnailrenderer.cpp:28]
UE4Editor_UnrealEd
UE4Editor_UnrealEd
UE4Editor_UnrealEd
UE4Editor_UnrealEd
UE4Editor_UnrealEd
UE4Editor
UE4Editor
UE4Editor
UE4Editor
UE4Editor
kernel32
ntdll
I changed the code in the UNoesisInstance::OnPreviewGotKeyboardFocus to
		
if (TextInputMethodContext.IsValid())
{
	TextInputMethodSystem->ActivateContext(TextInputMethodContext.ToSharedRef());
}
and now it works.

Second, the Chinese characters don't render correctly in the box, seems like missing font?
error1.png
 
User avatar
hcpizzi
Site Admin
Posts: 236
Joined: 09 Feb 2012, 12:40

Re: Unreal Engine 4

13 Dec 2017, 10:18

@null You're right. There's going to be a lot of action before the end of the year as we close on the final 2.1 release and iron out the wrinkles on the plugin, so there will be new commits almost daily. After that, when the dust has settled and the code change rate is less frantic, GitHub releases sound like a great option. Please, bear with us for the next couple of weeks as we approach that next milestone.

@flyingtree Good catch. I introduced the if (PinnedWidget.IsValid()) late and didn't realize that created a code path that would lead to an uninitialized pointer. As for the font, the one used by most samples (Aero Matics) doesn't have glyphs for Chinese characters. Please, replace the references to that font family in MainWindow.xaml and ControlResources.xaml for one of your own that contains that character set.
 
flyingtree
Posts: 31
Joined: 09 Jun 2017, 04:47

Re: Unreal Engine 4

14 Dec 2017, 09:44

@flyingtree Good catch. I introduced the if (PinnedWidget.IsValid()) late and didn't realize that created a code path that would lead to an uninitialized pointer. As for the font, the one used by most samples (Aero Matics) doesn't have glyphs for Chinese characters. Please, replace the references to that font family in MainWindow.xaml and ControlResources.xaml for one of your own that contains that character set.
@hcpizzi still not works, when I changed the font family to Microsoft YaHei.
<UserControl
...
	FontFamily="Microsoft YaHei"
...>
e1.png
 
User avatar
hcpizzi
Site Admin
Posts: 236
Joined: 09 Feb 2012, 12:40

Re: Unreal Engine 4

14 Dec 2017, 10:27

@flyingtree There's a Style applied to TextBoxes in ControlResources.xaml:
<Style TargetType="{x:Type TextBox}">
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="local:ElementExtensions.FocusOnHover" Value="True"/>
            </Trigger>
        </Style.Triggers>
        <Setter Property="FontFamily" Value="./#Aero Matics"/>
You have to change the font family there as well. We will update the sample to remove the font family from the Styles in the near future.
 
flyingtree
Posts: 31
Joined: 09 Jun 2017, 04:47

Re: Unreal Engine 4

16 Dec 2017, 07:31

@flyingtree There's a Style applied to TextBoxes in ControlResources.xaml:
<Style TargetType="{x:Type TextBox}">
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="local:ElementExtensions.FocusOnHover" Value="True"/>
            </Trigger>
        </Style.Triggers>
        <Setter Property="FontFamily" Value="./#Aero Matics"/>
You have to change the font family there as well. We will update the sample to remove the font family from the Styles in the near future.
@hcpizzi still doesn't works, I downloaded the font Source Han Sans Regular and replaced the FontFamily attribute. Then reimported xaml and the font imported into the editor automatically. But the result was still the same, chinese characters didn't render. And there were some warnings:
LogNoesis: Warning: /Game/MainWindow.MainWindow(1): Unable to convert './Source Han Sans Regular' to a valid value for property UserControl.FontFamily.
LogNoesis: Warning: /Game/ControlResources.ControlResources(14): Unable to convert './Source Han Sans Regular' to a valid value for property Setter.Value.
Could you change the Login demos's font to test this case?
 
User avatar
hcpizzi
Site Admin
Posts: 236
Joined: 09 Feb 2012, 12:40

Re: Unreal Engine 4

16 Dec 2017, 10:57

Could you try FontFamily=“./#Source Han Sans Regular” instead of FontFamily=“./Source Han Sans Regular”?
 
flyingtree
Posts: 31
Joined: 09 Jun 2017, 04:47

Re: Unreal Engine 4

17 Dec 2017, 12:41

Could you try FontFamily=“./#Source Han Sans Regular” instead of FontFamily=“./Source Han Sans Regular”?
still not works
LogNoesis: Warning: /Game/MainWindow.MainWindow(1): Unable to convert './#Source Han Sans Regular' to a valid value for property UserControl.FontFamily.
LogNoesis: Warning: Game/ControlResources.ControlResources(14): Unable to convert './#Source Han Sans Regular' to a valid value for property Setter.Value.
LogNoesis: Warning: Invalid value 'DependencyProperty.UnsetValue' for property 'TextElement.FontFamily' in Setter
LogNoesis: Warning: /Game/ControlResources.ControlResources(14): Unable to convert './#Source Han Sans Regular' to a valid value for property Setter.Value.
You can download Source Han Sans here https://github.com/be5invis/source-han- ... f/releases
 
User avatar
hcpizzi
Site Admin
Posts: 236
Joined: 09 Feb 2012, 12:40

Re: Unreal Engine 4

17 Dec 2017, 20:18

IME.png
It works for me. Take into account that "./#Source Han Sans" is a path relative to the file that contains it (in this case MainWIndow.xaml and ControlResources.xaml), so you have to place the ttf file in the same folder where those files are (the Contents folder of the sample) for it to work.

To find out more about URis in NoesisGui, please refer to this document: https://www.noesisengine.com/docs/Gui.Core.URIs.html

Who is online

Users browsing this forum: No registered users and 0 guests