Quantcast
Channel: Multiplayer
Viewing all articles
Browse latest Browse all 16796

Casting NetworkEventType.DataEvent data into a struct or class based on command

$
0
0
Is there a clever way to automatically cast and populate a structure or class when receiving data based on what command you send?

Suppose I have a structure for player movement that has an x and y, or a command for getting item data.

If it was possible to make user defined NetworkEventType messages, that would be the "command" to let you know which structs to populate. But I don't think there is.

Viewing all articles
Browse latest Browse all 16796

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>