Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

calling javascript functions from unity scripts

mergeInto(LibraryManager.library {
    Loaded: function()
    {
        window.CheckLoad();
    },
}); 


/*
Unity C# script

public class blablabla : MonoBehaviour
{
    [DllImport("__Internal")]
    private static extern void Loaded();

    public static void IsLoaded()
    {
#if !UNITY_EDITOR && UNITY_WEBGL
        Loaded();
#endif
    }

    void Start()
    {
        IsLoaded();
    }
}*/
 
PREVIOUS NEXT
Tagged: #calling #javascript #functions #unity #scripts
ADD COMMENT
Topic
Name
6+5 =