I've constructed a SubMesh like so:
var subMesh:SubMesh = new SubMesh(subGeometry, parentMesh);
If I assign a material to the SubMesh, I get the following exception/
stackdump:
Main Thread (Suspended: TypeError: Error #1009: Cannot access a
property or method of a null object reference.)
away3d.core.base::SubGeometry/get animation
away3d.core.base::SubMesh/get animation
away3d.materials::MaterialBase/addOwner
away3d.core.base::SubMesh/set material
<snip>
public function get animation() : AnimationBase
{
return _parentGeometry._animation;
}
_parentGeometry is null. This is only set in
Geometry.addSubGeometry().
When I add a SubGeometry to a SubMesh, am I also supposed to add the
same SubGeometry to Mesh.geometry also?
I suspect I'm running into a slightly underdeveloped part of the API,
and I'm trying to figure out how best to steer around this error.
I need to have one object, with multiple materials. I'm happy to
achieve this however I can with the current API.
-Dave