예제 #1
0
    private void Awake()
    {
        if (Instance == null)
        {
            Instance = this;

            Initialize();
        }
        else
        {
            Destroy(gameObject);
        }
    }
예제 #2
0
        public void CopyTo(Stream stream)
        {
            var fragment = FragmentPool.Get();

            try
            {
                int read;
                while ((read = m_Reader.Read(fragment.Data, 0, fragment.Data.Length)) > 0)
                {
                    stream.Write(fragment.Data, 0, read);
                }
            }
            finally
            {
                fragment.TryReturn();
            }
        }
예제 #3
0
 private void Awake()
 {
     Instance = this;
 }