Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

New Pro Web Graphics code

Discussion in 'Scripting' started by marty, Dec 11, 2007.

  1. marty

    marty

    Joined:
    Apr 27, 2005
    Posts:
    1,170
    I noticed that Unity 2.x makes markedly different web code than Unity 1.6.x did.

    Is there a posting somewhere that combines this new code with the special sauce code that Pro users need to use to get custom download progress bars and splash logos?
     
  2. AaronC

    AaronC

    Joined:
    Mar 6, 2006
    Posts:
    3,552
  3. marty

    marty

    Joined:
    Apr 27, 2005
    Posts:
    1,170
    Thanks, Targos.

    Well, I imported the Post-Process Build doo-hickey into my project and did a webplayer build, but it still isn't working. In fact, it appears that Unity is still just doing a normal build.

    Any idea what's up?
     
  4. AaronC

    AaronC

    Joined:
    Mar 6, 2006
    Posts:
    3,552
    Hmm odd. Sounds like one of those, reboot and maybe it fixes itself jobs. It worked straight off for me..

    But as HB said, build-and-run is broken.

    AC
     
  5. marty

    marty

    Joined:
    Apr 27, 2005
    Posts:
    1,170
    Oops!

    I renamed Tom's folder, so I guess the script couldn't find the custom graphics.

    Folder un-renamed now, everything works.

    Awesome, Tom!
     
  6. HiggyB

    HiggyB

    Unity Product Evangelist

    Joined:
    Dec 8, 2006
    Posts:
    6,183
    Yeah, you MUST leave the folder name of "Editor" in place as that folder is the only location Unity will look for the PostprocessBuildPlayer PERL script. Everything else in my package file (other than the PERL script) can be moved elsewhere in your project folder if you'd like, you'll just need to change the relative paths found in the PERL script so those files are found properly.

    To be clear, the build-and-run feature itself is not broken, it's just that my script interrupts the process. The issue is that when you create a web player build Unity creates your *.unity3d file and the *.html file, it then tries to open that *.html file. The issue with my script is that it deletes the originally created *.html file and replaces it with a new one, and Unity can't find/open the file as it's been deleted. So Build and Run inside Unity is perfectly functional, using my script interrupts that and prevents it from operating as expected.

    I just wanted folks to be clear on what's "broken" and how. :)
     
  7. marty

    marty

    Joined:
    Apr 27, 2005
    Posts:
    1,170
    BTW, aside from being the nice example of Unity extensibility that Tom intended, this little bundle adds a great bit of functionality that Pro users have long needed in Unity.

    Thanks, Tom!
     
  8. HiggyB

    HiggyB

    Unity Product Evangelist

    Joined:
    Dec 8, 2006
    Posts:
    6,183
    You're welcome Marty (and others)!

    By the way, the package file I created is now available from unity3d.com's Example Projects page:

    Example Projects

    :)
     
  9. AaronC

    AaronC

    Joined:
    Mar 6, 2006
    Posts:
    3,552
    Actually before anybody does anything here, can we just check that those packages work on windows? The 2.0 doesnt work for me yet. I get active x warnings then nothing. I named my webplayer build as "data" so that when you look at the folder the .unity3d file is "data.unity3d" I wonder if thats the problem?

    AC
     
  10. HiggyB

    HiggyB

    Unity Product Evangelist

    Joined:
    Dec 8, 2006
    Posts:
    6,183
    Did you manually change the name of the file? If so, did you then also change the name of the file as listed in the src tags in the HTML? If you changed the *.unity3d file name and not the HTML tags then you just broke your page...

    If you really want the web player file named data.unity3d then use my script's name over-ride capabilities, in that case my script updates the HTML for you.

    Edit: in checking some files Targos sent me I see that he did indeed make the necessary page changes. Doing some tests now...
     
  11. AaronC

    AaronC

    Joined:
    Mar 6, 2006
    Posts:
    3,552
    Hi Tom,

    No I built the Webplayers with the name "data".

    I sent you an email about it. If you check out the links, you should be able to read the html if you click "view source" in Safari. However I dont think thats the issue. Look it might be something I'm doing? The webbys work on mac, but not on Windows. Im posting publiclly because I dont want others to hit this when they dont have to.
    Aaron
     
  12. HiggyB

    HiggyB

    Unity Product Evangelist

    Joined:
    Dec 8, 2006
    Posts:
    6,183
    Debugging now Targos... Stand by. Is there another thread in which you raised this point? I ask that because that would be the most appropriate place for my reply, if not then I'll share details here instead. If you have another thread then post a link to that here, thanks!
     
  13. AaronC

    AaronC

    Joined:
    Mar 6, 2006
    Posts:
    3,552
    Theres this thread and the "One html template to rule them all", but we havent discussed any bugs in that one.

    Thanks Tom.
    AC
     
  14. marty

    marty

    Joined:
    Apr 27, 2005
    Posts:
    1,170
    Coooool thread title!

    Hey, Tom. Please be sure and post here to let us know when you put the fix on this. I assume you'll just upload it to the Example Projects version.
     
  15. HiggyB

    HiggyB

    Unity Product Evangelist

    Joined:
    Dec 8, 2006
    Posts:
    6,183
    Dinner calls. I will post any fixes to the unity3d.com site and describe the changes made here in this thread when done.
     
  16. marty

    marty

    Joined:
    Apr 27, 2005
    Posts:
    1,170
    Danke, dudeman!