- Home /
IsLoaded function for Browsercommunication?
Hi, is there any function that provides the isLoaded state for the unity webplayer useable for jQuery? Kind regards
Answer by ByteSheep · Apr 10, 2013 at 01:27 PM
http://docs.unity3d.com/Documentation/Manual/UnityWebPlayerandbrowsercommunication.html
Pay special attention to the section "Calling web page functions from Unity web player content".
Hi merry,
thx for responding. I actually know this send message function, but it's not what I'm searching.
I want to track the loading process if programm has finished the inital load (let's they after onInitial is done)!
If I understood correctly then you would like the web browser to know when the first level/menu of the game has loaded, right? This will help you get the level load progress: http://docs.unity3d.com/Documentation/ScriptReference/Application.GetStreamProgressForLevel.html
This should be all that you need to call a javascript function on your webpage once the first level has finished loading.
the thing is, I want to check out of the browser if the unity-object is loading all these functions just works out of unity
There is no way, that I am aware of, to detect whether the unity web player has finished loading your first level using only jquery.
You need to call a function on your webpage from unity once the game has loaded.
Here is an example:
Unity code:
Application.ExternalCall( "UnityLoaded", "Unity has finished loading!" );
Javascript on your page:
<script type="text/javascript" language="javascript">
<!--
function UnityLoaded( msg )
{
//unity has loaded..
alert( msg );
}
-->
</script>
Using jquery you won't be able to check if the web player has loaded your game like you would with normal html elements such as image files etc.
but whats about UnityObject2, aren't there any values stored? Whats about the firstFrameCallback? There is no topic in the documentation that speaks about it...
Your answer
Follow this Question
Related Questions
Texture loading via www.texture not loading! 2 Answers
Turn off / invalidate browser cache 2 Answers
How do I make my webplayer fill the entire browser window? 8 Answers
unityObject is null 2 Answers
How to prevent the Unity web player from auto loading 2 Answers