Skip to main content

IOExtensions.WriteVector2Nullable

Declaration#

public static void WriteVector2Nullable(Stream fs, Nullable<Vector2> value)

Parameters#

NameDescription
fsStream to use
valueValue to write

Description#

Write a nullable vector2 to a stream

Usage#

Example
using NullSave.GDTK;using System.IO;using UnityEngine;
public class ExampleObject : MonoBehaviour{
    private void Start()    {            MemoryStream ms = new MemoryStream();            ms.WriteVector2Nullable(new Vector2(-42, 42));
            ms.Seek(0, SeekOrigin.Begin);            Debug.Log("Result: " + ms.ReadVector2Nullable());    }
}