Skip to content

Commit 4b1bdea

Browse files
Support boxing and unboxing
1 parent 4f60cb2 commit 4b1bdea

5 files changed

Lines changed: 2684 additions & 89 deletions

File tree

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ This project aims to give you a viable alternative to C#. Scripting in C++ isn't
1212
* Low performance overhead
1313
* Easy integration with any Unity project
1414
* Fast compile, build, and code generation times
15+
* Don't lose support from Unity Technologies
1516

1617
# Reasons to Prefer C++ Over C# #
1718

@@ -94,12 +95,13 @@ While IL2CPP transforms C# into C++ already, it generates a lot of overhead. The
9495
* Arrays (single- and multi-dimensional)
9596
* Delegates
9697
* Events
98+
* Boxing and unboxing (e.g. boxing `int` to `object`, casting `object` to `int`)
9799

98100
# Performance
99101

100-
Most projects will see a net performance win by reducing garbage collection, eliminating IL2CPP overhead, and access to compiler intrinsics and assembly. Calls from C++ into C# incur a minor performance penalty, so if most of your code is calls to .NET APIs then you may experience a net performance loss.
102+
Almost all projects will see a net performance win by reducing garbage collection, eliminating IL2CPP overhead, and access to compiler intrinsics and assembly. Calls from C++ into C# incur only a minor performance penalty. In the rare case that almost all of your code is calls to .NET APIs then you may experience a net performance loss.
101103

102-
For testing and benchmarks, see this [article](http://jacksondunstan.com/articles/3952).
104+
[Testing and benchmarks article](http://jacksondunstan.com/articles/3952)
103105

104106
# Project Structure
105107

@@ -189,9 +191,9 @@ To configure the code generator, open `NativeScriptTypes.json` and notice the ex
189191

190192
Note that the code generator does not support (yet):
191193

192-
* Boxing and unboxing (e.g. boxing `int` to `object`, casting `object` to `int`)
193194
* `MonoBehaviour` contents (e.g. fields) except for "message" functions
194195
* `Array` methods (e.g. `IndexOf`)
196+
* `string` methods (e.g. `Substring`)
195197
* Default parameters
196198
* Interfaces
197199
* `decimal`

0 commit comments

Comments
 (0)