Announcement

Collapse
No announcement yet.

Saving/Loading and Array of Objects

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Saving/Loading and Array of Objects

    I've looked at tutorials, Tappy Chicken and Rama's example, but can someone tell me what is the "recommended" way to save and load an array of objects?

    More specifically, procedurally generated actors, which seem to break the FArchive derived routines in the engine (they use FindObject, but since they are procedurally generated, they are not assets). I can code up something custom, but I was wondering if I missed something built-in that would do the transforms, materials, etc.

    EDIT:and I can't edit my typo in the subject :P
    It is by will alone I set my code in motion.
    It is by coding that thoughts acquire speed, the hands acquire shaking, the shaking becomes a warning.
    It is by will alone I set my code in motion.

    #2
    I provided additional code and information on your answerhub post

    https://answers.unrealengine.com/que...f-objects.html



    Rama
    UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

    ♥ Rama

    Comment


      #3
      Originally posted by Rama View Post
      I provided additional code and information on your answerhub post

      https://answers.unrealengine.com/que...f-objects.html



      Rama
      I replied there and now here for more visibility.

      Thanks Rama, I know about the << operator. What I am looking for is the proper way to handle procedural objects. I had looked at the header files, and saw that everything derived from FMemoryArchive has the << operator disabled for UObject*. And the ones for UObject (in ArchiveUObject.h) require assets, for which there are none in procedural generated objects.


      Code:
      class FMemoryArchive : public FArchive
      {
      
      ...
      
      	virtual FArchive& operator<<( class UObject*& Res )
      	{
      		// Not supported through this archive
      		check(0);
      		return *this;
      	}
      
      ...
      It is by will alone I set my code in motion.
      It is by coding that thoughts acquire speed, the hands acquire shaking, the shaking becomes a warning.
      It is by will alone I set my code in motion.

      Comment


        #4
        new response

        https://answers.unrealengine.com/que...f-objects.html
        UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

        ♥ Rama

        Comment


          #5
          Originally posted by Rama View Post
          Thanks again Rama, but it is not the answer I am looking for. I too have a save system that works the way you describe, but there is a whole object archiving infrastructure included in the engine. I want to know what the recommended way of using it is, instead of doing low-level archiving.
          It is by will alone I set my code in motion.
          It is by coding that thoughts acquire speed, the hands acquire shaking, the shaking becomes a warning.
          It is by will alone I set my code in motion.

          Comment


            #6
            Well hopefully Epic can reply to you on the matter then

            I prefer lower level to save as much space as possible on the HDD


            But once again,

            Thank you for posting your research on generating dynamic meshes!

            Your research saved me a lot of time!

            Here's a pic of a UV-Mapped generated Torus Knot with collision, that I made in-game, and the process was vastly sped up because you shared your research!





            Rama
            UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

            ♥ Rama

            Comment

            Working...
            X