Comments (2)
@Algorithman has done some great work looking into this issue. It isn't an issue in UEngine::CopyPropertiesForUnrelatedObjects
as described in the original post, but instead an issue in the hotreload default value propagation in UpdateDefaultProperties
(#80 also stems from this issue). See the PR he has made for UE4 here https://github.com/EpicGames/UnrealEngine/pull/5830.
There are also issues with reinstancing subobjects in ReplaceObjectHelper
(KismetReinstanceUtilities.cpp) which result in non structurally modified subobjects to become corrupt after hotreload (this impacts the C++ hotreload too). This can be tested by defining a component in C++, adding it a blueprint, modifying an exposed property on that component in C++, then hotreloading. It looks like an RF_ArchetypeObject is marked as "pending kill" and the replacement object doesn't work as expected in its place (possibly an object reference isn't being updated?). It should be noted that if you make a structural change, then modify the value in subsequent compiles, it doesn't have the same issue, but there are asserts which fire complaining about archetype object issues (bArchetypeReinstanced). These RF_ArchetypeObject tagged objects are suffixed with _GEN_VARIABLE
, none of the other objects create the same issue.
Creating a correct fix for the subobject issue in ReplaceObjectHelper
is a bit out of the scope of my knowledge area for how all of this is set up. There are some hacks which should work which involve skipping the RF_ArchetypeObject tagged objects whilst reinstancing, but this will most likely cause issues in other places. I could change USharp to detect a CDO change and force a full recompile if so (this would result in that assert being fired on non-structural changes, but it should work. I'm unsure of the side effects).
Some more information on the subobject issue:
After you have made the structural change, the _GEN_VARIABLE
(RF_ArchetypeObject) objects no longer show up in the call to ReplaceObjectHelper
. This is possibly related to why the bArchetypeReinstanced
assert fires. It also explains why there the object doesn't become corrupt on subsequent compiles (because it's no longer being marked as pending kill).
from usharp.
Fixed in b79d8d4
The ReplaceObjectHelper
issue as described above requires engine source modification, see https://github.com/pixeltris/UnrealEngine/tree/hotreload.
from usharp.
Related Issues (20)
- Question about CodeGenerator HOT 3
- crash when overriding some of my C++ native event and blueprint implementable event HOT 8
- Losing reference to C# class when restarting UE4 HOT 1
- Question: Creating mesh with USharp HOT 3
- Error and crash after hotreload with disabled USharpMinHotReload HOT 1
- FRandRange error!
- USharp doesn't compile HOT 11
- PluginInstaller can't find MSBuild with VisualStudio2019 Professional
- Error in Unreal Editor when recompiling MyProject.Managed.dll
- How to get GetWorld() in C#? HOT 1
- Support for default values on C# auto properties exposed to UE4 HOT 1
- Crash when hotreloading after changing the layout of a struct
- Replace method name string with nameof's
- Missing Engine Module ApexDestruction HOT 2
- UUserWidget -> GetWidgetFromName implementation? HOT 1
- [Bug] TMap's iterator is different between C# and C++ in UE 4.22 HOT 6
- Full dev integration HOT 4
- Class redirectors don't work HOT 1
- File.ReadAllText( ... ) crashes UE4 HOT 2
- Support for latent functions
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from usharp.