Talk:Subobjects

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to navigation Jump to search

Discussion

Pegasus: There seems to exist an issue with UnrealEd3 that relates to subobjects and maps containing the underscore character on one or more occasions in their filename. In such cases, when one attempts to edit a previously introduced custom class (e.g. via myLevel-ing from a .u package) within the Script Editor, which happens to have had its own subobject - like, say, a custom vehicle's KParams - and then that changed custom class is compiled, the log will produce a warning message about failing to load 'myLevel', explaining that the referenced KarmaParamsRBFull resource could not be found as an object. While this doesn't produce the familiar red-coloured error band at the bottom of the Script Editor to instantly let the editor know something's wrong and the changed code hasn't actually been compiled, the changed code will survive as text if the map is later saved (and can be seen if the map's custom classes are extracted), but the changes will still not have been compiled and thus won't take effect in the game, leading to a baffling, misleading bifurcation.

The takeaway: If you're getting bizarre KParams absence warnings in UnrealEd's log after modifying custom classes myLevel'd in maps with underscores in their filenames, replacing these characters with hyphens and reapplying the code changes could help resolve them. Adding this to growing list of reasons one should be wary of any seemingly innocuous character beyond letters, numbers and the dash in map filenames.

For reference, the message in full: <uscript>Log: Failed to load 'myLevel': Can't find file for package 'myLevel' Warning: Failed to load 'KarmaParamsRBFull myLevel.MyCustomVecPackage.KParams0': Failed to find object 'KarmaParamsRBFull myLevel.MyCustomVecPackage.KParams0' Error: ObjectProperty Engine.Actor.KParams: unresolved reference to 'KarmaParamsRBFull'myLevel.EONSLocust.KParams0</uscript>