Пример #1
0
        public void Construct_String_WithEmpty()
        {
            var value = new NonNullString(string.Empty);

            Assert.NotNull(value);
            Assert.Equal(string.Empty, value);
        }
Пример #2
0
        public void Construct_String_WithValue()
        {
            var s     = "=== string ===";
            var value = new NonNullString(s);

            Assert.IsType <NonNullString>(value);
            Assert.Equal(s, value);
        }
Пример #3
0
    private void SaveKeyframesAsynchronously(string path)
    {
        Debug.Log($"SaveKeyframesAsynchronously");
        // create a job to be executed asynchronously
        SaveKeyframesJob saveJob = new SaveKeyframesJob();

        // pass arguments to that job
        NativeArray <AllKeyFrames> allKeyframesContainer = new NativeArray <AllKeyFrames>(1, Allocator.Persistent);

        allKeyframesContainer[0]      = allKeyFrames;
        saveJob.allKeyFramesContainer = allKeyframesContainer;
        NativeArray <NonNullString> pathContainer = new NativeArray <NonNullString>(1, Allocator.Persistent);
        NonNullString nonNullPath = new NonNullString(path);

        pathContainer[0]      = nonNullPath;
        saveJob.pathContainer = pathContainer;

        // start the job
        saveJobHandle = saveJob.Schedule();
        Debug.Log($"Schedule called");
    }