Skip to content

About MessagePackObject for getting Key value #525

Answered by KWINEKO
KWINEKO asked this question in Q&A
Discussion options

You must be logged in to vote

I solved it

const properties = klass.type.object.method<Il2Cpp.Array<Il2Cpp.Object>>('GetProperties', 0).invoke()
for (var i = 0; i < properties.length; i++) {
            const propertie = properties.get(i)
            const attributes = propertie.method<Il2Cpp.Array<Il2Cpp.Object>>('GetCustomAttributes').invoke(true)
            for (var j = 0; j < attributes.length; j++) {
                const attribute = attributes.get(j)
                if (attribute.toString() != 'MessagePack.KeyAttribute') continue

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by vfsfitvnm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant