Working on embedding.
diff --git a/Source/Actor.cpp b/Source/Actor.cpp
index 891c283..9bc7406 100644
--- a/Source/Actor.cpp
+++ b/Source/Actor.cpp
@@ -28,10 +28,12 @@
 	m_RenderNodeCount(0),
 	m_SolverNodeCount(0),
 	m_AnimationsCount(0),
+	m_NestedActorAssetCount(0),
 	m_ImageNodes(nullptr),
 	m_RenderNodes(nullptr),
 	m_Solvers(nullptr),
-	m_Animations(nullptr)
+	m_Animations(nullptr),
+	m_NestedActorAssets(nullptr)
 
 {
 
@@ -52,10 +54,17 @@
 	delete [] m_Nodes;
 	delete [] m_ImageNodes;
 	delete [] m_Solvers;
-	if((m_Flags & IsInstance) != 0)
+	if((m_Flags & IsInstance) == 0x0)
 	{
 		delete [] m_Animations;	
+
+		for (int i = 0; i < m_NestedActorAssetCount; i++)
+		{
+			delete m_NestedActorAssets[i];
+		}
+		delete [] m_NestedActorAssets;
 	}
+	
 
 	m_ComponentCount = 0;
 	m_NodeCount = 0;
@@ -64,12 +73,14 @@
 	m_RenderNodeCount = 0;
 	m_SolverNodeCount = 0;
 	m_AnimationsCount = 0;
+	m_NestedActorAssetCount = 0;
 	m_Components = nullptr;
 	m_Nodes = nullptr;
 	m_ImageNodes = nullptr;
 	m_RenderNodes = nullptr;
 	m_Solvers = nullptr;
 	m_Animations = nullptr;
+	m_NestedActorAssets = nullptr;
 	m_Root = nullptr;
 }
 
@@ -101,6 +112,15 @@
 	return nullptr;
 }
 
+NestedActorAsset* Actor::nestedActorAsset(unsigned int index) const
+{
+	if(index < m_NestedActorAssetCount)
+	{
+		return m_NestedActorAssets[index];
+	}
+	return nullptr;
+}
+
 void Actor::eventCallback(ActorAnimationEvent::Callback callback, void* userdata)
 {
 	m_EventCallbackUserData = userdata;
@@ -165,6 +185,9 @@
 			case BlockType::Animations:
 				readAnimationsBlock(block);
 				break;
+			case BlockType::NestedActorAssets:
+				readNestedActorAssetsBlock(block);
+				break;
 			default:
 				break;
 		}
@@ -214,6 +237,35 @@
 	}
 }
 
+void Actor::readNestedActorAssetsBlock(BlockReader* block)
+{
+	m_NestedActorAssetCount = (int)block->readUnsignedShort();
+	m_NestedActorAssets = new NestedActorAsset*[m_NestedActorAssetCount];
+
+	BlockReader* nestedActorAssetBlock = nullptr;
+	int nestedActorIndex = 0;
+
+	while ((nestedActorAssetBlock = block->readNextBlock()) != nullptr)
+	{
+		switch (nestedActorAssetBlock->blockType<BlockType>())
+		{
+			case BlockType::NestedActorAsset:
+				// Sanity check.
+				if (nestedActorIndex < m_NestedActorAssetCount)
+				{
+					NestedActorAsset* asset = makeNestedActorAsset();
+					asset->read(nestedActorAssetBlock);
+					m_NestedActorAssets[nestedActorIndex++] = asset;
+				}
+				break;
+			default:
+				break;
+		}
+
+		nestedActorAssetBlock->close();
+	};
+}
+
 void Actor::readAnimationsBlock(BlockReader* block)
 {
 	m_AnimationsCount = (int)block->readUnsignedShort();
@@ -251,6 +303,16 @@
 	return new ActorStaticMesh();
 }
 
+NestedActorNode* Actor::makeNestedActorNode()
+{
+	return new NestedActorNode();
+}
+
+NestedActorAsset* Actor::makeNestedActorAsset()
+{
+	return new NestedActorAsset();
+}
+
 void Actor::readComponentsBlock(BlockReader* block)
 {
 	m_ComponentCount = block->readUnsignedShort() + 1;
@@ -302,6 +364,12 @@
 				}
 				break;
 			}
+			case BlockType::NestedActorNode:
+			{
+				m_RenderNodeCount++;
+				component = NestedActorNode::read(this, componentBlock, makeNestedActorNode());
+				break;
+			}
 			case BlockType::ActorIKTarget:
 				m_SolverNodeCount++;
 				component = ActorIKTarget::read(this, componentBlock);
@@ -352,6 +420,9 @@
 
 			switch (component->type())
 			{
+				case ComponentType::NestedActorNode:
+					m_RenderNodes[rndIdx++] = static_cast<NestedActorNode*>(component);
+					break;
 				case ComponentType::ActorStaticMesh:
 					m_RenderNodes[rndIdx++] = static_cast<ActorStaticMesh*>(component);
 					break;
@@ -439,6 +510,9 @@
 			m_Components[idx++] = instanceComponent;
 			switch (instanceComponent->type())
 			{
+				case ComponentType::NestedActorNode:
+					m_RenderNodes[rndIdx++] = static_cast<NestedActorNode*>(instanceComponent);
+					break;
 				case ComponentType::ActorStaticMesh:
 					m_RenderNodes[rndIdx++] = static_cast<ActorStaticMesh*>(instanceComponent);
 					break;
@@ -478,6 +552,11 @@
 	}
 }
 
+const int Actor::nestedActorCount() const
+{
+	return m_NestedActorAssetCount;
+}
+
 const int Actor::textureCount() const
 {
 	return m_MaxTextureIndex + 1;
diff --git a/Source/Actor.hpp b/Source/Actor.hpp
index a6f00aa..2d72941 100644
--- a/Source/Actor.hpp
+++ b/Source/Actor.hpp
@@ -8,6 +8,8 @@
 #include "Solver.hpp"
 #include "Animation/ActorAnimation.hpp"
 #include "Animation/ActorAnimationInstance.hpp"
+#include "NestedActorAsset.hpp"
+#include "NestedActorNode.hpp"
 
 namespace nima
 {
@@ -29,12 +31,17 @@
 		CustomIntProperty = 13,
 		CustomFloatProperty = 14,
 		CustomStringProperty = 15,
-		ActorStaticMesh = 22
+		ActorStaticMesh = 22,
+		NestedActorNode = 23,
+		NestedActorAssets = 24,
+		NestedActorAsset = 25
 	};
 
 	class Actor
 	{
 		friend class ActorAnimationInstance;
+		friend class NestedActorNode;
+
 		public:
 			Actor();
 			virtual ~Actor();
@@ -56,6 +63,7 @@
 			ActorAnimationEvent::Callback m_EventCallback;
 			void readComponentsBlock(BlockReader* block);
 			void readAnimationsBlock(BlockReader* block);
+			void readNestedActorAssetsBlock(BlockReader* block);
 			
 		protected:
 			int m_MaxTextureIndex;
@@ -63,17 +71,21 @@
 			int m_RenderNodeCount;
 			int m_SolverNodeCount;
 			int m_AnimationsCount;
+			int m_NestedActorAssetCount;
 			std::string m_BaseFilename;
 
 			ActorImage** m_ImageNodes;
 			ActorRenderNode** m_RenderNodes;
 			Solver** m_Solvers;
 			ActorAnimation* m_Animations;
+			NestedActorAsset** m_NestedActorAssets;
 
 			virtual ActorImage* makeImageNode();
 			virtual ActorStaticMesh* makeStaticMeshNode();
+			virtual NestedActorNode* makeNestedActorNode();
+			virtual NestedActorAsset* makeNestedActorAsset();
 			virtual void dispose();
-			virtual void updateVertexDeform(ActorImage* image) {};
+			virtual void updateVertexDeform(ActorImage* image) {}
 
 		public:
 			void load(unsigned char* bytes, unsigned int length);
@@ -84,6 +96,9 @@
 			ActorComponent* component(unsigned short index) const;
 			ActorComponent* component(const std::string& name) const;
 
+			const int nestedActorCount() const;
+			NestedActorAsset* nestedActorAsset(unsigned int index) const;
+
 			void eventCallback(ActorAnimationEvent::Callback callback, void* userdata = nullptr);
 			
 			template<typename T>
diff --git a/Source/ActorComponent.hpp b/Source/ActorComponent.hpp
index d2e0fa0..68973bd 100644
--- a/Source/ActorComponent.hpp
+++ b/Source/ActorComponent.hpp
@@ -26,7 +26,8 @@
 		CustomIntProperty = 13,
 		CustomFloatProperty = 14,
 		CustomStringProperty = 15,
-		ActorStaticMesh = 22
+		ActorStaticMesh = 22,
+		NestedActorNode = 23
 	};
 
 
diff --git a/Source/ActorNode.hpp b/Source/ActorNode.hpp
index b738aca..224b9d1 100644
--- a/Source/ActorNode.hpp
+++ b/Source/ActorNode.hpp
@@ -74,7 +74,7 @@
 			float overrideRotationValue() const;
 			void updateTransform();
 			void updateTransforms();
-			void updateWorldTransform();
+			virtual void updateWorldTransform();
 			void addChild(ActorNode* node);
 			void removeChild(ActorNode* node);
 			void resolveComponentIndices(ActorComponent** components) override;
diff --git a/Source/NestedActorAsset.cpp b/Source/NestedActorAsset.cpp
new file mode 100644
index 0000000..d707d30
--- /dev/null
+++ b/Source/NestedActorAsset.cpp
@@ -0,0 +1,36 @@
+#include "NestedActorAsset.hpp"
+#include "BlockReader.hpp"
+
+using namespace nima;
+
+
+NestedActorAsset::NestedActorAsset()
+{
+
+}
+
+NestedActorAsset::~NestedActorAsset()
+{
+
+}
+
+const std::string& NestedActorAsset::name() const
+{
+	return m_Name;
+}
+
+const std::string& NestedActorAsset::id() const
+{
+	return m_Id;
+}
+
+void NestedActorAsset::read(BlockReader* reader)
+{
+	m_Name = reader->readString();
+	m_Id = reader->readString();
+}
+
+Actor* NestedActorAsset::actor()
+{
+	return nullptr;
+}
\ No newline at end of file
diff --git a/Source/NestedActorAsset.hpp b/Source/NestedActorAsset.hpp
new file mode 100644
index 0000000..255c78f
--- /dev/null
+++ b/Source/NestedActorAsset.hpp
@@ -0,0 +1,32 @@
+#ifndef _NIMA_NESTEDACTORASSET_HPP_
+#define _NIMA_NESTEDACTORASSET_HPP_
+
+#include <string>
+#include <vector>
+#include <functional>
+
+namespace nima
+{
+	class BlockReader;
+	class Actor;
+
+	class NestedActorAsset
+	{
+		protected:
+			std::string m_Name;
+			std::string m_Id;
+
+		public:
+
+			NestedActorAsset();
+			virtual ~NestedActorAsset();
+
+			const std::string& name() const;
+			const std::string& id() const;
+
+			virtual Actor* actor();
+			void read(BlockReader* reader);
+
+	};
+}
+#endif
\ No newline at end of file
diff --git a/Source/NestedActorNode.cpp b/Source/NestedActorNode.cpp
new file mode 100644
index 0000000..b4f9772
--- /dev/null
+++ b/Source/NestedActorNode.cpp
@@ -0,0 +1,66 @@
+#include "NestedActorNode.hpp"
+#include "BlockReader.hpp"
+#include "Actor.hpp"
+
+using namespace nima;
+
+NestedActorNode::NestedActorNode() :
+	ActorRenderNode(ComponentType::NestedActorNode),
+	m_Asset(nullptr),
+	m_ActorInstance(nullptr)
+{
+
+}
+
+NestedActorNode::~NestedActorNode()
+{
+	delete m_ActorInstance;
+}
+
+ActorComponent* NestedActorNode::makeInstance(Actor* resetActor)
+{
+	NestedActorNode* instanceNode = resetActor->makeNestedActorNode();
+	instanceNode->copy(this, resetActor);
+	return instanceNode;
+}
+
+void NestedActorNode::copy(NestedActorNode* node, Actor* resetActor)
+{
+	Base::copy(node, resetActor);
+
+	m_DrawOrder = node->m_DrawOrder;
+	m_Asset = node->m_Asset;
+	/*Actor* actor = m_Asset->actor();
+	if(actor != nullptr)
+	{
+		m_ActorInstance = m_Asset->actor()
+	}*/
+}
+
+void NestedActorNode::updateWorldTransform()
+{
+	Base::updateWorldTransform();
+	if(m_ActorInstance != nullptr)
+	{
+		m_ActorInstance->root()->overrideWorldTransform(worldTransform());
+	}
+}
+
+NestedActorNode* NestedActorNode::read(Actor* actor, BlockReader* reader, NestedActorNode* node)
+{
+	if (node == nullptr)
+	{
+		node = new NestedActorNode();
+	}
+
+	Base::read(actor, reader, node);
+
+	bool isVisible = reader->readByte() != 0;
+	if (isVisible)
+	{
+		node->m_DrawOrder = (int)reader->readUnsignedShort();
+		int assetIndex = (int)reader->readUnsignedShort();
+		node->m_Asset = actor->nestedActorAsset(assetIndex);
+	}
+	return node;
+}
\ No newline at end of file
diff --git a/Source/NestedActorNode.hpp b/Source/NestedActorNode.hpp
new file mode 100644
index 0000000..e634148
--- /dev/null
+++ b/Source/NestedActorNode.hpp
@@ -0,0 +1,30 @@
+#ifndef _NIMA_NESTEDACTORNODE_HPP_
+#define _NIMA_NESTEDACTORNODE_HPP_
+
+#include "ActorRenderNode.hpp"
+
+namespace nima
+{
+	class Actor;
+	class BlockReader;
+	class NestedActorAsset;
+
+	class NestedActorNode : public ActorRenderNode
+	{
+		typedef ActorRenderNode Base;
+		protected:
+			NestedActorAsset* m_Asset;
+			Actor* m_ActorInstance;
+
+		public:
+			NestedActorNode();
+			virtual ~NestedActorNode();
+
+			ActorComponent* makeInstance(Actor* resetActor) override;
+			void updateWorldTransform() override;
+			void copy(NestedActorNode* node, Actor* resetActor);
+
+			static NestedActorNode* read(Actor* actor, BlockReader* reader, NestedActorNode* node = NULL);
+	};
+}
+#endif
\ No newline at end of file