Code Monkey home page Code Monkey logo

Comments (2)

pixeltris avatar pixeltris commented on May 10, 2024 1

@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.

pixeltris avatar pixeltris commented on May 10, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.