ihavenick
(Ata Çetin)
November 29, 2015, 5:07pm
21
Ok i set it from tool bar but not worked . Setting x64 from properties fixed it. Thanks. But i still have problem with compiling 4.10.
The other thing seems to me like a broken file. I’d try to get it fresh from github (the CorePrivatePCH.h).
Or try a complete rebuild, maybe something went wrong while writing the file.
ihavenick
(Ata Çetin)
November 30, 2015, 8:46pm
23
I tryed to compile this 6+ hours. and now i compiled. Now i tried to create klawr .cs file and editor crashed again.
i copied dll files to myproject/binaries/win64
ihavenick
(Ata Çetin)
November 30, 2015, 9:03pm
24
Find the problem
[2015.11.30-21.01.17:727] 0]Running …....\Engine\Intermediate\ProjectFiles\Scripts\Build.bat “D:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\x86_amd64\vcvarsx86_amd64.bat” Scripts.csproj2015.11.30-21.01.17:829] 0]‘msbuild’ is not recognized as an internal or external command,
[2015.11.30-21.01.17:829] 0]operable program or batch file.
[2015.11.30-21.01.17:829] 0]ERROR: Failed to build Scripts.csproj
[2015.11.30-21.01.17:931] 0]LogKlawrEditorPlugin:Error: Failed to build scripts assembly.
[2015.11.30-21.01.18:046] 0]LogObj: 28718 objects as part of root set at end of initial load.
[2015.11.30-21.01.18:046] 0]LogUObjectAllocator: 6115600 out of 0 bytes used by permanent object pool.
Edit: added .net to path now problem is
[2015.11.30-21.06.27:488] 0]Compiling Scripts…
[2015.11.30-21.06.27:488] 0]Running …....\Engine\Intermediate\ProjectFiles\Scripts\Build.bat “D:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\x86_amd64\vcvarsx86_amd64.bat” Scripts.csproj
[2015.11.30-21.06.28:496] 0]C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3270: There was a mismatch between the processor architecture of the project being built “MSIL” and the processor architecture of the reference “Klawr.ClrHost.Managed.dll”, “AMD64”. This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. [D:\4.10\Engine\Intermediate\ProjectFiles\Scripts\Scripts.csproj]
[2015.11.30-21.06.28:697] 0] Scripts -> D:\4.10\Engine\Binaries\Win64\Klawr\ShadowCopy\GameScripts.dll
[2015.11.30-21.06.29:765] 0]LogObj: 28718 objects as part of root set at end of initial load.
[2015.11.30-21.06.29:765] 0]LogUObjectAllocator: 6115608 out of 0 bytes used by permanent object pool.
Edit no: 42233
Fatal error!
Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0xffffffff
UE4Editor-CoreUObject.dll!`anonymous namespace’::StaticFindObjectWithChangedLegacyPath() [d:\4.10\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:142]
UE4Editor-CoreUObject.dll!StaticFindObject() [d:\4.10\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:242]
UE4Editor-UnrealEd.dll!FKismetEditorUtilities::CreateBlueprint() [d:\4.10\engine\source\editor\unrealed\private\kismet2\kismet2.cpp:378]
UE4Editor-KlawrEditorPlugin.dll!UKlawrBlueprintFactory::FactoryCreateNew() [d:\4.10\engine\plugins\klawr\klawreditorplugin\source\klawreditorplugin\private\klawrblueprintfactory.cpp:67]
UE4Editor-UnrealEd.dll!UFactory::FactoryCreateNew() [d:\4.10\engine\source\editor\unrealed\classes\factories\factory.h:148]
UE4Editor-AssetTools.dll!FAssetTools::CreateAsset() [d:\4.10\engine\source\developer\assettools\private\assettools.cpp:353]
UE4Editor-ContentBrowser.dll!SAssetView::CreateAssetFromTemporary() [d:\4.10\engine\source\editor\contentbrowser\private\sassetview.cpp:2974]
UE4Editor-ContentBrowser.dll!SAssetView::AssetRenameCommit() [d:\4.10\engine\source\editor\contentbrowser\private\sassetview.cpp:3429]
UE4Editor-ContentBrowser.dll!TBaseSPMethodDelegateInstance<0,SAssetView,0,TTypeWrapper<void> __cdecl(TSharedPtr<FAssetViewItem,0> const & __ptr64,FString const & __ptr64,FSlateRect const & __ptr64,enum ETextCommit::Type)>::Execute() [d:\4.10\engine\source\runtime\core\public\delegates\delegateinstancesimpl_variadics.inl:282]
UE4Editor-ContentBrowser.dll!TBaseSPMethodDelegateInstance<0,SAssetView,0,void __cdecl(TSharedPtr<FAssetViewItem,0> const & __ptr64,FString const & __ptr64,FSlateRect const & __ptr64,enum ETextCommit::Type)>::ExecuteIfSafe() [d:\4.10\engine\source\runtime\core\public\delegates\delegateinstancesimpl_variadics.inl:388]
UE4Editor-ContentBrowser.dll!SAssetViewItem::HandleNameCommitted() [d:\4.10\engine\source\editor\contentbrowser\private\assetviewwidgets.cpp:508]
UE4Editor-ContentBrowser.dll!TBaseSPMethodDelegateInstance<0,SAssetTileItem,0,TTypeWrapper<void> __cdecl(FText const & __ptr64,enum ETextCommit::Type)>::Execute() [d:\4.10\engine\source\runtime\core\public\delegates\delegateinstancesimpl_variadics.inl:282]
UE4Editor-ContentBrowser.dll!TBaseSPMethodDelegateInstance<0,SAssetTileItem,0,void __cdecl(FText const & __ptr64,enum ETextCommit::Type)>::ExecuteIfSafe() [d:\4.10\engine\source\runtime\core\public\delegates\delegateinstancesimpl_variadics.inl:388]
UE4Editor-Slate.dll!SInlineEditableTextBlock::OnTextBoxCommitted() [d:\4.10\engine\source\runtime\slate\private\widgets ext\sinlineeditabletextblock.cpp:292]
UE4Editor-Slate.dll!TBaseSPMethodDelegateInstance<0,SInlineEditableTextBlock,0,TTypeWrapper<void> __cdecl(FText const & __ptr64,enum ETextCommit::Type)>::Execute() [d:\4.10\engine\source\runtime\core\public\delegates\delegateinstancesimpl_variadics.inl:282]
UE4Editor-Slate.dll!TBaseSPMethodDelegateInstance<0,SInlineEditableTextBlock,0,void __cdecl(FText const & __ptr64,enum ETextCommit::Type)>::ExecuteIfSafe() [d:\4.10\engine\source\runtime\core\public\delegates\delegateinstancesimpl_variadics.inl:388]
UE4Editor-Slate.dll!SEditableText::OnEnter() [d:\4.10\engine\source\runtime\slate\private\widgets\input\seditabletext.cpp:911]
UE4Editor-Slate.dll!FTextEditHelper::OnKeyDown() [d:\4.10\engine\source\runtime\slate\private\framework ext extedithelper.cpp:191]
UE4Editor-Slate.dll!SEditableText::OnKeyDown() [d:\4.10\engine\source\runtime\slate\private\widgets\input\seditabletext.cpp:1518]
UE4Editor-Slate.dll!<lambda_aecc0dcd28a75afb5aabe6b3b7d4c719>::operator()() [d:\4.10\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:3920]
UE4Editor-Slate.dll!FEventRouter::Route<FReply,FEventRouter::FBubblePolicy,FKeyEvent,<lambda_aecc0dcd28a75afb5aabe6b3b7d4c719> >() [d:\4.10\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:214]
UE4Editor-Slate.dll!FEventRouter::RouteAlongFocusPath<FEventRouter::FBubblePolicy,<lambda_aecc0dcd28a75afb5aabe6b3b7d4c719>,FKeyEvent>() [d:\4.10\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:196]
UE4Editor-Slate.dll!FSlateApplication::ProcessKeyDownEvent() [d:\4.10\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:3918]
UE4Editor-Slate.dll!FSlateApplication::OnKeyDown() [d:\4.10\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:3845]
UE4Editor-Core.dll!FWindowsApplication::ProcessDeferredMessage() [d:\4.10\engine\source\runtime\core\private\windows\windowsapplication.cpp:1260]
UE4Editor-Core.dll!FWindowsApplication::DeferMessage() [d:\4.10\engine\source\runtime\core\private\windows\windowsapplication.cpp:1709]
UE4Editor-Core.dll!FWindowsApplication::ProcessMessage() [d:\4.10\engine\source\runtime\core\private\windows\windowsapplication.cpp:707]
UE4Editor-Core.dll!FWindowsApplication::AppWndProc() [d:\4.10\engine\source\runtime\core\private\windows\windowsapplication.cpp:629]
USER32.dll
USER32.dll
UE4Editor-Core.dll!FWindowsPlatformMisc::PumpMessages() [d:\4.10\engine\source\runtime\core\private\windows\windowsplatformmisc.cpp:884]
UE4Editor.exe!FEngineLoop::Tick() [d:\4.10\engine\source\runtime\launch\private\launchengineloop.cpp:2391]
UE4Editor.exe!GuardedMain() [d:\4.10\engine\source\runtime\launch\private\launch.cpp:142]
UE4Editor.exe!GuardedMainWrapper() [d:\4.10\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]
UE4Editor.exe!WinMain() [d:\4.10\engine\source\runtime\launch\private\windows\launchwindows.cpp:200]
UE4Editor.exe!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:264]
KERNEL32.DLL
ntdll.dll
ntdll.dll
and
[2015.11.30-21.42.06:912][395]LogKlawrEditorPlugin:Warning: InGeneratedClass: KlawrBlueprintGeneratedClass
[2015.11.30-21.42.06:913][395]LogKlawrEditorPlugin:Warning: InGeneratedClass: KlawrBlueprintGeneratedClass
[2015.11.30-21.42.06:921][395]LogKlawrEditorPlugin:Warning: InGeneratedClass: KlawrBlueprintGeneratedClass
[2015.11.30-21.42.06:921][395]LogKlawrEditorPlugin:Warning: InGeneratedClass: KlawrBlueprintGeneratedClass
[2015.11.30-21.42.09:875][478]LogContentBrowser: Native class hierarchy updated for ‘BlueprintGraph’ in 0.0131 seconds. Added 107 classes and 0 folders.
[2015.11.30-21.42.19:759][961]LogKlawrEditorPlugin:Warning: ------------------------------------------->
[2015.11.30-21.42.49:725][881]Compiling Scripts…
[2015.11.30-21.42.49:725][881]Running C:\Users\Prince\Documents\Unreal Projects\MyProject4\Intermediate\ProjectFiles\MyProject4Scripts\Build.bat “D:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\x86_amd64\vcvarsx86_amd64.bat” MyProject4Scripts.csproj
[2015.11.30-21.42.50:443][881]C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3270: There was a mismatch between the processor architecture of the project being built “MSIL” and the processor architecture of the reference “Klawr.ClrHost.Managed.dll”, “AMD64”. This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. [C:\Users\Prince\Documents\Unreal Projects\MyProject4\Intermediate\ProjectFiles\MyProject4Scripts\MyProject4Scripts.csproj]
[2015.11.30-21.42.50:544][881] MyProject4Scripts -> C:\Users\Prince\Documents\Unreal Projects\MyProject4\Binaries\Win64\Klawr\ShadowCopy\GameScripts.dll
Hi ihavenick,
I didnt have this problem yet.
As for the 2nd and last error message, i’d try to change to x64 in your MyProject4Scripts.csproj. Should eliminate the mismatch error/warning message.
What is Edit 42233? What did try to do?
ihavenick
(Ata Çetin)
December 1, 2015, 3:47pm
26
Ok, thanks. Its working now. Finally.
Changing csproj from properties fixed and now its working.
There are few bugs remaining , like building blueprint with" klawr c# call" inside it, crashing engine.
and right clicking to klawr c#call not showing function like yours.
And cant get this code working
public override void TickComponent(float deltaTime)
{
long instanceID = 0;
UObjectHandle nativeComponent = new UObjectHandle();
TestActor ta = new TestActor(instanceID, nativeComponent);
counter++;
var vect = ta.GetActorScale3D();
vect.X += delta;
vect.Z -= delta;
vect.Y += delta;
ta.SetActorScale3D(vect);
if (((delta > 0.0f) && (vect.X > 1.5f)) || ((delta < 0.0f) && (vect.X < 0.5f)))
{
delta = -delta;
}
}
Hi ihavenick,
The example above was not quite right, my bad.
Here’s an updated one:
namespace Klawr4_9
{
public class TestNewKlawr : UKlawrScriptComponent
{
public TestNewKlawr(long instanceID, UObjectHandle nativeComponent)
: base(instanceID, nativeComponent)
{
}
** // This will bring a Actor property into the blueprint
// You will have to set it before you want to access it in the TickComponent method, best practice would be to add a null check in TickComponent
[UPROPERTY]
public AActor TestActor {get;set;}
// As for functions, decorate them with the UFUNCTION attribute. Then they (and their parameters will be accessible in the Klawr c# call node
[UFUNCTION]
pubilc string TestMyStringFunction(string part1, string part2, int counter)
{
return part1 + " " + counter + " " + part2;
}**
private float delta = 0.01f;
private int counter = 0;
public override void TickComponent(float deltaTime)
{
** if (TestActor == null)
{ return; }
** counter++;
var vect = TestActor.GetActorScale3D();
vect.X += delta;
vect.Z -= delta;
vect.Y += delta;
TestActor.SetActorScale3D(vect);
if (((delta>0.0f) && (vect.X > 1.5f))||((delta<0.0f) && (vect.X<0.5f)))
{
delta = -delta;
}
}
[UPROPERTY()]
public string StringTester {get;set;}
}
Plan is to make the UFUNCTION and UPROPERTY attributes like the ones in UE4, so meta tags can be passed along too. But thats in the future.
Maybe i can make another video where i show more of what i’ve done yet. I just dont find the time
**
PS: UObjects can not be passed as method parameters yet, as well as arrays. UObjects just wont be sent to c# script, arrays might crash.**
PPS: return values might not be sent back correctly working on it
PPS2: fixed in editorNode branch
Updated Klawr, changes are on the develop branch:
Changed transfer of class/property/method information to JSON (now much easier to expand)
Meta tags can be supplied in the UPROPERTYAttribute decorations
Removed obsolete functions from the CLR interface
Fix for a bug preventing a c++ project to be created
ihavenick
(Ata Çetin)
December 5, 2015, 12:22pm
29
I tested it now , (compiling take 2 hour)
Its working great !!
But mine old projects crashing now .(no crash log)
There is a another bug, if you look directly to klawr component attached actor, fps dropping.
You talking about the Actor you use in the TickComponent method (from my example)?
Yes. It is constantly changing its size, not something you want to do in every tick.
2 hrs… did you rebuild the whole engine?
i have two batch files http://pastebin.com/wfZkAiWW
if you change the paths you can use them too.
it reduces my build time to ~2mins
Usage:
first start clearKlawr.bat
it deletes the generated files then pauses.
while it pauses, do a full rebuild (Shift-F6) of the Klawr project
After that is done, resume the clearKlawr.bat
Then do a build of UE4 (no rebuild, just hit F6)
it regenerates the needed dll’s
After this step, call the copyKlawr.bat which will copy the newly created dll’s into your favorite project folder
I hope this helps
Update:
UObjects can now be passed as parameters and as function return values
Fixed some issues in the function call node
ihavenick
(Ata Çetin)
December 6, 2015, 12:21pm
31
Yep it build some things from start ( Visual studio says 500 jobs)
ok thank you , i will start it testing now.
(P.s. = is it safe to use ue4 with klawr to use in your projects ?. I have 2 seperete 4.10 versions , 1 .vanilla , 2. with klawr . I scared to use 4.10 with klawr in mine project ,because sometimes it crashes projects)
Strange thing happend.
I updated klawr and tested your spring function and its returned
[TestActor_C_0] and nothing on screen. (result pin connected to printscreen)
Algorithman
(Algorithman)
December 10, 2015, 10:51am
32
Answering your question about usage in production: It should still be considered as experimental work, so i wouldn’t use it in production.
gbsr
(gbsr)
December 15, 2015, 2:30pm
33
This is fantastic. Well done.
Dannington
(Dannington)
December 16, 2015, 10:27am
34
Nice… still waiting patiently for some talented Maverick to implement Python.
Algorithman
(Algorithman)
December 17, 2015, 10:33am
35
Isn’t python GPL?
Thanks.
But there is still a lot to do (and even more to learn for me to do it properly)
This looks really good. As a newcomer, should i be using your branch, or the main Enlight project?
Also, I’m a c# dev. Is there any way I can help out? I know a decent amount of C++ too.
My fork would be more advanced, since enlight has other projects going on now. Using the Develop branch is recommended.