A PlayerPrefs/mysql texture management for the Unity3d WebPlayer

Posted by admin on April 22, 2012 in mysql, Unity3d |

In this experiment I have created a simple two level edition system for online edits of the WebPlayer content.

The specially tagged geometry elements have a script attached, which displays a name label on hovering upon them. Clicking on them invokes the texture menu, which depends on number and  kind of materials.

There are two edition levels simply depending on the authorisation level of the current user. The basic level is simply just unlogged user, while admin level is equivalent with the logged one. Both allow for the edits of the content, but in case of of unlogged user these are saved to the PlayerPrefs, while in the admin case are saved to mysql database and retrieved after the loading the scene.

The PlayerPrefs is the way for local storage of littleweight data on the local user computer, while mysql can serve for a global one.

If any mysql data given, the WebPlayer loads them first, and then loads the PlayerPrefs data, if any.

If you want to share the edits – you have of course to use the second option.

At the moment the solution supports the texture management and is basically aimed at visualisation of scenes, that share the same geometry, but differ with texture sets.

The base example is here:

texture manager experiment

In this blog I have used the WordPress blog login system. If you wanted to test how it works to edit and share the above example, Please register (if not registered) and log in to get the acces to the record manager.

The record manager serves to add and delete records to the database and generate the links.

The whole idea came from a friend of mine, who is an event organizer and organizes outdoor events, offering several scene setups with repetitive geometry, but individual graphics. This way he would get those setups with fixed geometry from me and then would be able tu put the individual graphic himself and send the links for his clients. Then the clients would still be able to experiment with the textures on their own – on the player prefs level – if he leaves this feature enabled for them.

The “alternative content” link at the bottom strip on the linked page is my that disappears after loading WebPlayer is my template element which allow the users which do not have the Unity3d plugin installed to access the alternative content which in this case is the picture gallery. The javascript enabled mobile devices that do not hawe the Unity3d WebPlayer support got automatically redirected.

1 Comment

  • bhupender says:

    I am thinking of using this idea of yours and develop a website.
    We are a small event management company. So it would be very great full if you share your Idea with us. or help us develop the idea.. and If you want what would be the charges.

Leave a Reply

Copyright © 2011-2024 virtualPlayground All rights reserved.
VP based on Desk Mess Mirrored v1.8.3 theme from BuyNowShop.com.