All Projects → qingfeng346 → Scorpio Csharp

qingfeng346 / Scorpio Csharp

Licence: gpl-3.0
Unity游戏热更新脚本

Programming Languages

script
160 projects

Labels

Projects that are alternatives of or similar to Scorpio Csharp

Kinobinary
Binary image effect for Unity
Stars: ✭ 180 (-3.74%)
Mutual labels:  unity
Typogenic
Signed-distance field text rendering for Unity
Stars: ✭ 183 (-2.14%)
Mutual labels:  unity
Unitysingleton
The best way to implement singleton pattern in Unity.
Stars: ✭ 185 (-1.07%)
Mutual labels:  unity
Msbuildforunity
MSBuild integration in Unity
Stars: ✭ 181 (-3.21%)
Mutual labels:  unity
Unityanime4k
Anime4K upscaler for Unity
Stars: ✭ 183 (-2.14%)
Mutual labels:  unity
Unity
GitHub for Unity
Stars: ✭ 2,366 (+1165.24%)
Mutual labels:  unity
Unitybarcodescanner
Simple Unity Barcode Scanner
Stars: ✭ 180 (-3.74%)
Mutual labels:  unity
Before join socialgame
ソーシャルゲームのクライアントエンジニア入門以前
Stars: ✭ 187 (+0%)
Mutual labels:  unity
Zeroformatter
Infinitely Fast Deserializer for .NET, .NET Core and Unity.
Stars: ✭ 2,216 (+1085.03%)
Mutual labels:  unity
Videolabtest
OP-Z videolab examples
Stars: ✭ 186 (-0.53%)
Mutual labels:  unity
Serializablecallback
UnityEvent and System.Func had a child
Stars: ✭ 180 (-3.74%)
Mutual labels:  unity
Unitylive2dextractor
Unity Live2D Cubism 3 Extractor
Stars: ✭ 183 (-2.14%)
Mutual labels:  unity
Deform
A fully-featured deformer system for Unity.
Stars: ✭ 2,421 (+1194.65%)
Mutual labels:  unity
Vfxpyro
Fireworks particle effect with Unity VFX Graph
Stars: ✭ 181 (-3.21%)
Mutual labels:  unity
Deadsimple Pixel Perfect Camera
An exceedingly easy-to-use pixel perfect orthographic camera script for 2D scenes in Unity. Punch in a few specs and you've got a working pixel perfect camera. It's that easy.
Stars: ✭ 186 (-0.53%)
Mutual labels:  unity
Openbrushvr
Unity VR & AR Painting in 3d space for the Vive and Tango and ARKit
Stars: ✭ 180 (-3.74%)
Mutual labels:  unity
Carsimulator
A Top Down 2D Car Simulator For Unity
Stars: ✭ 184 (-1.6%)
Mutual labels:  unity
Isaura
An attempt at making a aura thingie with a isoline shader.
Stars: ✭ 187 (+0%)
Mutual labels:  unity
Magiconion
Unified Realtime/API framework for .NET platform and Unity.
Stars: ✭ 2,505 (+1239.57%)
Mutual labels:  unity
Oxide.rust
Rust game extension for the Oxide modding framework
Stars: ✭ 185 (-1.07%)
Mutual labels:  unity

Scorpio-CSharp


基础介绍


sco是c#实现的解释型脚本,是一种高效,轻量,可嵌入的脚本语言,语法类似javascript,类型为弱类型,通过使用基于栈的虚拟机解释字节码来运行.

安装 sco 命令行


方式一 手动安装

  • 下载Release对应版本,解压添加到环境变量

方式二 自动安装

  • windows 7, windows 8, MacOS, Linux 需要预先安装 PowerShell Core, 然后运行命令行
pwsh -Command "Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://qingfeng346.gitee.io/installsco.ps1'))"
  • windows 10 直接运行命令行, 也可以安装 PowerShell Core 使用上面的方法安装
powershell.exe -Command "Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://qingfeng346.gitee.io/installsco.ps1'))"

兼容的 .net 平台


  • unity2018及以上
  • .net framework 4.0 及以上
  • .net standard 2.0 及以上
  • .net core 2.0 及以上
  • asp.net
  • asp.net core
  • mono
  • xamarin

注意事项

  • 脚本文本文件编码要改成 utf8 without bom (无签名的utf8格式)

  • 使用 importType 函数引入一个c#类, 参数字符串请参考 Type.GetType, 类似

    • TopNamespace.SubNameSpace.ContainingClass+NestedClass,MyAssembly
    • TopNamespace.Sub+Namespace.ContainingClass+NestedClass,MyAssembly
  • 脚本内所有c#实例(除了bool,number,string,enum等基础类型) 均为引用, struct 变量也一样

  • event 对象 += -= 操作可以使用函数 add_[event变量名] remove_[event变量名] 代替

  • c# 扩展函数, 请先调用 importExtension("类型") 引用

  • Unity3d 使用 IL2CPP 后, 部分Unity3D的类或函数不能反射获取,请配置link.xml或者使用快速反射功能

  • genericMethod, genericType 函数在IL2CPP下生成未声明过的类型会报错

脚本调用c#运算符重载


运算符号 反射名称 脚本是否支持直接调用
+ op_Addition 支持
- op_Subtraction 支持
* op_Multiply 支持
/ op_Division 支持
% op_Modulus 支持
| op_BitwiseOr 支持
& op_BitwiseAnd 支持
^ op_ExclusiveOr 支持
> op_GreaterThan 支持
>= op_GreaterThanOrEqual 支持
< op_LessThan 支持
<= op_LessThanOrEqual 支持
== op_Equality 支持
!= op_Inequality 不支持, 脚本 != 会直接取反 ==
[] get_Item(获取变量) 支持 key 不为string的情况
[] set_Item(设置变量) 支持 key 不为string的情况

快速反射


  • 快速反射类生成

    • 使用命令行可以生成快速反射类文件,例子
    sco fast -dll [dll文件路径] -class [class完整名] -output [输出目录]
    
  • 快速反射类使用

    • 例如使用快速反射的类为 UnityEngine.GameObject , 生成的快速反射类则为ScorpioClass_UnityEngine_GameObject, 然后 c# 调用
    Scorpio.Userdata.TypeManager.SetFastReflectClass(typeof(UnityEngine.GameObject), new ScorpioClass_UnityEngine_GameObject(script))
    

源码目录说明


  • Scorpio 脚本引擎源码
  • ScorpioExec 命令行 sco
  • ScorpioReflect 快速反射机制的实现
  • ScorpioTest Unity3D内使用sco脚本示例

Unity相关


  • 支持的Unity版本

    • Unity2018及以上
    • 请设置 PlayerSettingApi Compatibility Level.NET Standard 2.0
  • 支持的Unity平台:

    • PC, Mac & Linux Standalone(包括IL2CPP)
    • iOS(包括IL2CPP)
    • Android(包括IL2CPP)
    • UWP(仅支持IL2CPP)
    • WebGL
  • Unity导入Scorpio-CSharp:

    • 复制源码目录 Scorpio/src 到Unity项目即可

捐助作者


Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].