Skip to content

Caching fields on C# side #1

Open
@Suvitruf

Description

@Suvitruf

Do we need to cache fields on C# side?

Caching ref fields like PackageInfo https://github.com/Suvitruf/unity-android-native/blob/master/Assets/UnityAndroidNative/Android/Content/Pm/PackageManager.cs#L11 in PackageManager is not the bad idea, 'cause this ref will not be changed.

But what's about primitive types, like mAction field of Intent? It would be a nice to reduce jni calls. But if something changes this field in native object, it will not be automatically changed on C# side.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions