I’m trying to add a new SpriteKind and I’m not allowed to edit spritekind.ts. There’s a padlock on most of the files. Is there a way to unlock them?
No there is not. You can instead create a custom.ts file. You can’t unlock them for security reasons.
You can’t - but this is how you create a new Sprite kind:
namespace SpriteKind {
export const YourNewKind = SpriteKind.create()
export const AnotherNewKind = SpriteKind.create()
}
1 Like
Correct that those files can’t be editted, but minor clarification - it’s not security related / editting those files would in theory be fine for the most part. The issue is that the content of those files is defined elsewhere - either in the editor itself, or in an extension (or they’re generated files, e.g. the asset files you can edit through the asset editor) - so they’re files that can change independent of the project itself by e.g. a dependency being updated or a new version of the editor being released.
This is all I needed. Thanks!
1 Like