Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
hyperPad

hyperPad Forum

  1. Home
  2. Help and Support
  3. Arrays across scenes

Arrays across scenes

Scheduled Pinned Locked Moved Help and Support
7 Posts 4 Posters 1.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Stuart_McKayS Offline
    Stuart_McKayS Offline
    Stuart_McKay
    wrote on last edited by
    #1

    Hello all,

    I’m hoping there is a quick answer to this and that it is possible.

    I want to store data in a number of arrays that can be accessed by a number of different scenes.

    My plan was to put some main arrays in to a scene specifically for it and retrieve/modify data directly from those scenes. I’ve tried doing a number of things such as broadcast etc but I expect this may not be working because the scene with the arrays isn’t loaded.

    Has anyone else done this? It seems like the best way to manage lots of different arrays needing accessed by lots of scens.

    Anyway, thanks in advance for your help.

    Stuart_McKayS 1 Reply Last reply
    0
    • Stuart_McKayS Stuart_McKay

      Hello all,

      I’m hoping there is a quick answer to this and that it is possible.

      I want to store data in a number of arrays that can be accessed by a number of different scenes.

      My plan was to put some main arrays in to a scene specifically for it and retrieve/modify data directly from those scenes. I’ve tried doing a number of things such as broadcast etc but I expect this may not be working because the scene with the arrays isn’t loaded.

      Has anyone else done this? It seems like the best way to manage lots of different arrays needing accessed by lots of scens.

      Anyway, thanks in advance for your help.

      Stuart_McKayS Offline
      Stuart_McKayS Offline
      Stuart_McKay
      wrote on last edited by
      #2

      I think I may have answered my own question. By using the save to and load from file option. Only downside is that that I would need to load the scene first to save the array so it can be accessed later by scenes.

      Aidan_FireA 1 Reply Last reply
      0
      • Stuart_McKayS Stuart_McKay

        I think I may have answered my own question. By using the save to and load from file option. Only downside is that that I would need to load the scene first to save the array so it can be accessed later by scenes.

        Aidan_FireA Offline
        Aidan_FireA Offline
        Aidan_Fire
        wrote on last edited by
        #3

        @Stuart_McKay Yep, what you’ve found is the only way to share information between scenes, save and load to file.

        1 Reply Last reply
        0
        • KamdroidK Offline
          KamdroidK Offline
          Kamdroid
          wrote on last edited by
          #4

          @Stuart_McKay @Aidan_Fire You can also use Global UI objects to share information between scenes.

          For example, you could place a label in Global UI layer, and use that as the shareable array between scenes.

          Here's a quick example I've made (if it doesn't open, long-press the link and tap Open Link):
          Share Global Array Example.tap

          This is just a basic example. You could also utilise Broadcast/Receive Message behaviours for more advanced functionality, e.g. auto-updating information when the array changes.

          Stuart_McKayS Aidan_FireA 2 Replies Last reply
          1
          • KamdroidK Kamdroid

            @Stuart_McKay @Aidan_Fire You can also use Global UI objects to share information between scenes.

            For example, you could place a label in Global UI layer, and use that as the shareable array between scenes.

            Here's a quick example I've made (if it doesn't open, long-press the link and tap Open Link):
            Share Global Array Example.tap

            This is just a basic example. You could also utilise Broadcast/Receive Message behaviours for more advanced functionality, e.g. auto-updating information when the array changes.

            Stuart_McKayS Offline
            Stuart_McKayS Offline
            Stuart_McKay
            wrote on last edited by
            #5

            @Kamdroid Ah ha, good shout, I may experiment with this a bit more.

            RobinsonXR 1 Reply Last reply
            0
            • Stuart_McKayS Stuart_McKay

              @Kamdroid Ah ha, good shout, I may experiment with this a bit more.

              RobinsonXR Offline
              RobinsonXR Offline
              RobinsonX
              wrote on last edited by
              #6

              @Stuart_McKay As already suggested above, you can save and load data via the save to file and load from file behavior. You can also store attributes on a global object and switch scenes, as long as the global UI doesn't reset.

              Another way you can do this is put the array in the global behaviors. Global behaviors are behaviors that are shared across all scenes - they can be accessed by clicking on the globe icon in the scene editor.

              1 Reply Last reply
              0
              • KamdroidK Kamdroid

                @Stuart_McKay @Aidan_Fire You can also use Global UI objects to share information between scenes.

                For example, you could place a label in Global UI layer, and use that as the shareable array between scenes.

                Here's a quick example I've made (if it doesn't open, long-press the link and tap Open Link):
                Share Global Array Example.tap

                This is just a basic example. You could also utilise Broadcast/Receive Message behaviours for more advanced functionality, e.g. auto-updating information when the array changes.

                Aidan_FireA Offline
                Aidan_FireA Offline
                Aidan_Fire
                wrote on last edited by
                #7

                @Kamdroid Literally no idea why I haven’t tried that yet, and if I have tried it no idea why I’m not doing it.

                1 Reply Last reply
                0

                Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                With your input, this post could be even better 💗

                Register Login
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Search