Beispiel #1
0
        unsafe bool CheckSentinel(BinaryPrimitiveReaderAdapter reader, uint expected)
        {
            var offset = _PrimitiveReader.Buffer->Offset;

            reader.Buffer->ReadNext(out uint sentinel);

            if (sentinel == expected)
            {
                return(true);
            }

            _PrimitiveReader.Buffer->Offset = offset;
            return(false);
        }
 unsafe public PropertiesBinaryReader(UnsafeAppendBuffer.Reader *stream)
 {
     _PrimitiveReader = new BinaryPrimitiveReaderAdapter(stream);
     AddAdapter(_PrimitiveReader);
 }
 unsafe public PropertiesBinaryReader(UnsafeAppendBuffer.Reader *stream, UnityEngine.Object[] objectTable)
 {
     _PrimitiveReader = new BinaryPrimitiveReaderAdapter(stream);
     _ObjectTable     = objectTable;
     AddAdapter(_PrimitiveReader);
 }