CesiumGS / CesiumGS/cesium-unity

Reinterop: Allow C++ implementation classes to access private fields / properties / methods of C# class

Open
#210 0 comments 0 reactions 0 assignees View on GitHub
enhancement reinterop
Dominant language
C#
Stars
535
Forks
132
Avg merge
6h 45m
Merged PRs (30d)
1

Description

When using the `[ReinteropNativeImplementation]` attribute, the C++ and C# classes are conceptually one class, just with parts implemented in two different languages. To make that more seamless, it would be nice if the C++ code could access private members of the C# class. Currently the only way to do this is by declaring the private members "internal" instead.

Contributor guide

Open the contributing guide

Research direction

Start by locating the implementation of the [ReinteropNativeImplementation] attribute and the C++/C# interoperation it generates or coordinates. Determine how private fields, properties, and methods are represented across the boundary, then verify that a C++ implementation can access them without changing the C# members to internal.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, csharp
Domain
devtools, game-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.