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

  • 相关阅读:
    xpath获取a标签下文本
    Python学习笔记Day26
    DNS原理
    命令实战解析
    linux系统ext文件系统知识
    磁盘分区重点知识
    机械磁盘读写磁盘数据的原理
    linux用户管理
    linux命令讲解
    linux系统定时任务
  • 原文地址:https://www.cnblogs.com/answerwinner/p/4590958.html
Copyright © 2011-2022 走看看