Function RWLock.Write
Write
()
Aquire a write lock on the main thread.
Public
WriteLockAsync Write ()
Aquire a write lock on the main thread.
This method will not block until all asynchronous read and write locks have been released, instead you should make sure to add the returned JobHandle as a dependency to any jobs that use the locked data.
If a synchronous write lock is currently held, this method will throw an exception.
var readLock = AstarPath.active.LockGraphDataForReading();
var handle = new MyJob {
// ...
}.Schedule(readLock.dependency);
readLock.UnlockAfter(handle);