puerts_cli

开箱即用的 PuerTS 脚手架工具。

MIT License

Downloads
29
Stars
40
Committers
2

PuerTS Puerts


  • SWC
  • TypescriptWebpack
  • SouremapHot reload
  • Puerts WebGL Web
  • Web

Unity Puerts 2.X

Node.js 16.15.0+

# npm
npm install @puerts/cli -g

# yarn
yarn global add @puerts/cli

# 
puer -v

puer

Puerts Cli --help

# 
puer -h

#  build 
puer build -h

# ...

  • Unity 2021+ LTS 3D
  • Puerts
    • Puerts PuerTS_Nodejs_xxx.tgz SourcemapHotreload Node
    • Puerts Assets/ Assets/Puerts/
    • Puerts
      • UnityEditor: Assets -> Puerts -> Plugins -> xx -> xx
      • Inspector Apply Editor
      • UnityEditor
    • PuertsWebGL
    • package PuertsWebGL
    • PuertsWebGL Assets/ Assets/PuertsWebGL/
  • `` Web
    • Unity
    • minigame.xxx.unitypackage
  • Puerts
    • Unity
    • puer init Puerts
  • Gamma Web
    • UnityEditor -> Editor -> Project Settings -> Player -> Other Settings -> Color Space -> Gamma
  • Blittables
    • UnityEditor -> Editor -> Project Settings -> Player -> Other Settings -> Allow 'unsafe' Code
  • Puerts Code
    • UnityEditor -> PuerTS -> Clear Generated Code
    • UnityEditor -> PuerTS -> Generated Code
    • UnityEditor -> PuerTS -> Generated index.d.ts (global.CS style)
  • Puerts
    • Unity
    • puer build TS JS
    • Unity Editor
    • Assets/Scenes/App.unity
    • Play
    • Unity
    • puer dev TS JS
    • --reload false

Web

  • Web
    • UnityEditor Unity-WebGL-Support
    • `PuertsWebGL```
    • WebGL Scene
      • UnityEditor
      • UnityEditor File -> Build Settings -> WebGL -> Switch Platform
      • UnityEditor File -> Build Settings -> Add Open Scenes
    • UnityEditor ->
      • appid
      • CDN http://localhost:10000 cli Web CDN
      • puer.config.js minigameOutputDir
        • puer.config.js puer init /TS/puer.config.js
        • minigameOutputDir //
      • WEBGL
        • UnityEditor Console
  • puerts
    • cd Unity
    • puer build --target minigame --browse
      • puerts TS
      • puer.config.js minigameOutputDir ``

Web

    • UnityEditor Assets/Screnes/App.unity
    • UnityEditor Hierarchy -> Main Inspector Debug
    • UnityEditor
  • Vscode
    • Vscode Unity
    • Vscode Side -> `` -> Puerts

Vscode Debugger for Unity

Developer Guide

  • PuerTS_Nodejs Node
    • node_modulesnode require
      • PuerTS import import
      • Web``` Node`
  • WebGL
  • Shader.Find("Particles/Standard Unlit")
  • ./``../

Tencent @zombieyang4399 Game @sbfkcel