Changes to the EditableMesh and EditableImage APIs and/or workflows were to be expected during the beta period. Although documentation can sometimes still feel sparse, there’s definitely resources out there (including kindly asking for help on this forum!) that can help you figure out what you’re trying to do.
I couldn’t specifically ascertain what problem you were having or what you were trying to accomplish, but anyways, here’s an example of a dynamically created EditableMesh plane that scrolls a texture using EditableMesh UVs:
The code
-- Creating a simple face mesh
local AssetService = game:GetService("AssetService")
local mesh: EditableMesh = AssetService:CreateEditableMesh()
local v1: number = mesh:AddVertex(Vector3.new(4, 0, -4))
local v2: number = mesh:AddVertex(Vector3.new(-4, 0, -4))
local v3: number = mesh:AddVertex(Vector3.new(-4, 0, 4))
local v4: number = mesh:AddVertex(Vector3.new(4, 0, 4))
--[[
UV coords are typically in the range [0, 1], for example:
(0, 0) corresponds to the top left corner of an image
(1, 0) corresponds to the top right corner of an image
(0, 1) corresponds to the bottom left corner of an image
(1, 1) corresponds to the bottom right corner of an image
]]
local u1: number = mesh:AddUV(Vector2.new(1, 0))
local u2: number = mesh:AddUV(Vector2.new(0, 0))
local u3: number = mesh:AddUV(Vector2.new(0, 1))
local u4: number = mesh:AddUV(Vector2.new(1, 1))
local f1: number = mesh:AddTriangle(v1, v2, v3)
local f2: number = mesh:AddTriangle(v3, v4, v1)
mesh:SetFaceUVs(f1, {u1, u2, u3})
mesh:SetFaceUVs(f2, {u3, u4, u1})
local meshPart: MeshPart = AssetService:CreateMeshPartAsync(Content.fromObject(mesh))
meshPart.Anchored = true
meshPart.TextureContent = Content.fromAssetId(83555541734317) --You'll probably need to change this to some asset you own
meshPart.CFrame = CFrame.new(0, 4, 0)
meshPart.Parent = workspace
-- Adding simple texture scrolling
local RunService = game:GetService("RunService")
local SCROLL_PERIOD: number = 4
RunService.Heartbeat:Connect(function()
local tNorm: number = (tick() % SCROLL_PERIOD) / SCROLL_PERIOD
local v2Offset: Vector2 = Vector2.new(tNorm, 0)
--Here we scroll the UV coords outside the typical range, however the UV coords "wrap"
--In other words, the UV coords are (automatically) bound to the range [0, 1] using the function: x_output = mod(x_input, 1)
mesh:SetUV(u1, Vector2.new(1, 0) + v2Offset)
mesh:SetUV(u2, Vector2.new(0, 0) + v2Offset)
mesh:SetUV(u3, Vector2.new(0, 1) + v2Offset)
mesh:SetUV(u4, Vector2.new(1, 1) + v2Offset)
end)