A solution (for me at least)
Okay folks, I believe I actually have a solution to this problem. Note, however, this is an answer to what I was doing incorrectly and not necessarily a general solution. I was receiving a runtime error due to faulty implementation on my part (I still don't know if the RF_PUBLIC flag can actually be set somewhere). That being said, if you are trying to save DataObject data and receive the private external graph error, this might help.
Consider two objects A and B implemented as such:
Code:
class A extends Object;
var B objectB;
//function defs
Code:
class B extends Object;
var int one;
var int two;
var int three;
//function defs
Now, we want to load and save this object from file, so we have a gametype (or some other class) that looks like the following we will receive the error.
Code:
class NewGameType extends xDeathMatch;
var A objectToBeSaved;
function PreBeginPlay()
{
local B LocalObjectB;
//load the object from file
objectToBeSaved = self.LoadDataObject(class'A',"ObjectName","PackageName");
if(objectToBeSaved == None)
objectToBeSaved = self.CreateDataObject(class'A',"ObjectName","PackageName");
LocalObjectB.one = 1;
LocalObjectB.two = 2;
LocalObjectB.three = 3;
objectToBeSaved.ObjectB = LocalObjectB;
self.SavePackage("PackageName");
}
The problem is in the reference to the local object B (Note: now that I think of it, my object may not have been local, but hopefully the example will still make sense to my readers). So, we make the following adjustment.
Code:
class NewGameType extends xDeathMatch;
var A objectToBeSaved;
function PreBeginPlay()
{
local class<A> objectToBeSaved;
local B LocalObjectB;
//load the object from file
objectToBeSaved = self.LoadDataObject(class'A',"ObjectName","PackageName");
if(objectToBeSaved == None)
objectToBeSaved = self.CreateDataObject(class'A',"ObjectName","PackageName");
LocalObjectB.one = 1;
LocalObjectB.two = 2;
LocalObjectB.three = 3;
objectToBeSaved.ObjectB.one = LocalObjectB.one;
objectToBeSaved.ObjectB.two = LocalObjectB.two;
objectToBeSaved.ObjectB.three = LocalObjectB.three;
self.SavePackage("PackageName");
}
And everything should load and save correctly.
Note: This code has not actually been tested, but looked like it should work
. It is really only meant as an example -- hopefully it has been worth looking over.