public void SerializeActor(TextWriter stream, Actor myActor)
        {
            Actor template = null;
            if(myActor.ActorDefinition != null)
            {
                stream.WriteLine("BeginActor(\"" + myActor.ActorDefinition + "\")");
                template = CreateActor(myActor.ActorDefinition);
            }
            else
            {
                ConstructorInfo constructor = myActor.GetType().GetConstructor(new Type[] { });
                if (constructor != null)
                {
                    stream.WriteLine("ActorFactory.InitializeActor(" + myActor.GetType().Name + ".Create())");
                    template = (Actor)constructor.Invoke(null);
                }
            }

            if(template == null)
            {
                Log.Instance.Log("[WARN] Could not serialize actor '" + myActor.Name + "'.  Could not create a template for the actor.");
                return;
            }

            SerializeActorProperties(stream, template, myActor);

            // Write out all tags for the actor
            foreach (string tag in myActor.GetTags())
                stream.WriteLine("\tTag(\"" + tag + "\")");

            stream.WriteLine("EndActor()");
            stream.WriteLine();
        }