How much EditableMesh you can create

I’m not sure what category to put so let me know which one

I’d just like to know the maximum of EditableMesh you can create

1 Like

Pretty sure its different per each device as far as i remember.

I’ve tried creating six editablemesh for six planes, and some of them just didn’t seem to appear

EditableMesh and EditableImage is not replicatable rn.

What do you mean by that? I want each editablemesh to be manipulated (or something) individually

If you create them on server they won’t be displayed to clients.

That’s the thing, the editablemeshes are being created in the client.

I’ll wait for newer replies, if i don’t get anything good i’ll put the first reply as a solution.

1 Like

They are being created but if device-specfic (editable) memory budget is bypassed on limits, The next created EditableMesh will fail to be created and return nil

(This also affects client-sides, since device specfic-editable memory budget on editables)

There isnt a set number for how many you can create, it depends on the memory budget and how much of it you use. To my knowledge there is a set memory budget for the editableAPI, im not sure if it scales depending on the client or not, but thats someone youd have to look into cuz im lazy.

Using “active” editable meshes can use up the memory budget by allot because that editable mesh consumes the same amount of memory as a maxed out mesh (for example a meshpart with 20k triangles). There are ways to better handle the budget though, like by using a fixed editable mesh from your active editable mesh, so that way youre only using up the memory that you actually need.


Heres an example on how you can create a fixed editable mesh

local AssetService = game:GetService("AssetService")

local meshpart_params = {
	CollisionFidelity = Enum.CollisionFidelity.Box,
	FluidFidelity = Enum.FluidFidelity.UseCollisionGeometry
}
local editable_mesh_params = {
	FixedSize = true
}

-- create a unfixed editable mesh to do the main mesh stuff on
local editable_mesh = AssetService:CreateEditableMesh()

-- create a fixed editable mesh from the unfixed editable mesh to save resources
local fixed_editable_mesh = AssetService:CreateEditableMeshAsync(Content.fromObject(editable_mesh), editable_mesh_params)

-- remove the old unfixed editable mesh
editable_mesh:Destroy()

-- create a meshpart with the fixed editable mesh
local meshpart = AssetService:CreateMeshPartAsync(Content.fromObject(fixed_editable_mesh), meshpart_params)
meshpart:ApplyMesh(meshpart)
meshpart.CFrame = CFrame.new(0, 10, 0)
meshpart.Name = "apple juice"
meshpart.CanCollide = false
meshpart.CanQuery = false
meshpart.Anchored = true

Im using fixed editable meshes for my module, and im able to get way with hundreds of editable meshes on screen at the same time.


If you needed to do something like minecraft terrain for example, where you cant just use a fixed editable mesh by itself because you need to be able to update the terrain, you can create a system that creates the terrain with a unfixed editable mesh and after its done creating the mesh, you switch it to a fixed editable mesh. And because editable meshes use content, when you need to update the terrain, you can create a new unfixed editable mesh from the fixed editable mesh, and then update the mesh terrain and make that one into a fixed editable mesh. And you can just repeat. (make sure you destroy the unused editable meshes though)

5 Likes

From what i’ve been doing, you’re pretty much right.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.