Пример #1
0
    static int RefreshTile(IntPtr L)
    {
        try
        {
            ToLua.CheckArgsCount(L, 2);
            UnityEngine.Tilemaps.Tilemap obj  = (UnityEngine.Tilemaps.Tilemap)ToLua.CheckObject(L, 1, typeof(UnityEngine.Tilemaps.Tilemap));
            UnityEngine.Vector3Int       arg0 = StackTraits <UnityEngine.Vector3Int> .Check(L, 2);

            obj.RefreshTile(arg0);
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Пример #2
0
        public void RefreshTile(Vector3Int position)
        {
            if (m_AddToList)
            {
                if (m_RefreshCount >= m_RefreshPos.Length)
                {
                    var refreshPos = new NativeArray <Vector3Int>(Math.Max(1, m_RefreshCount * 2), Allocator.Temp);
                    NativeArray <Vector3Int> .Copy(m_RefreshPos, refreshPos, m_RefreshPos.Length);

                    m_RefreshPos.Dispose();
                    m_RefreshPos = refreshPos;
                }
                m_RefreshPos[m_RefreshCount++] = position;
            }
            else
            {
                m_Tilemap.RefreshTile(position);
            }
        }
Пример #3
0
 public void RefreshTile(Vector3Int position)
 {
     m_Tilemap.RefreshTile(position);
 }