zoukankan      html  css  js  c++  java
  • JSBinding / Gen Bindings

    Classes in JSBindingSettings.classes array will be exported to JavaScript.

     

    There are already many classes (most of them are from UnityEngine.dll) in that array, you have to add your own classes, and maintain this array.

     1     public static Type[] classes = new Type[]
     2     {
     3         /*
     4          * Classes to export for demo
     5          * Add classes here to export
     6          */
     7         
     8         typeof(UnityEngine.WheelCollider),
     9         typeof(UnityEngine.PhysicMaterial),
    10         typeof(UnityEngine.Collision),
    11         typeof(UnityEngine.ControllerColliderHit),
    12         typeof(UnityEngine.CharacterController),
    13 
    14         //....
    15     }

     

    Add to JSBindingSetting.enums to export enums:

    public static Type[] enums = new Type[]
    {
        typeof(KeyCode),
    
        // add here
    };

     

     

    Click this menu to export those classes:

    Assets | JavaScript | Gen Bindings

     

     

    NOTE: This menu must be executed when swiching to a different platform in Build Settings dialog!

     

    after finished, two parts of code will be generated:

    1) C# files in folder Assets/JSBinding/Generated/

     

    2) JavaScript files in folder StreamingAssets/JavaScript/Lib/Gen.javascript (all in one)

     

    back to JSBinding / Home

  • 相关阅读:
    mapreduce 函数入门 三
    *hiho 1475
    hiho 1571
    hiho 1620
    hiho 1613
    centos下nginx配置
    hiho 1617
    hiho 172周
    uva 11584
    hiho1605
  • 原文地址:https://www.cnblogs.com/answerwinner/p/4590958.html
Copyright © 2011-2022 走看看