playcanvas / playcanvas/editor

Enable macros for scripts

Open
#451 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area: publishing enhancement
Dominant language
TypeScript
Stars
1.3k
Forks
215
Avg merge
1d 29m
Merged PRs (30d)
30

Description

It would be nice to be able to have a macro that the scripts could use to filter out some debugging parts. Similar to the engine side:

// #if _DEBUG
        
console.log('some debug info')
        
// #endif

Perhaps an ability to define the macros for build vs dev would be nice.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files, tests, or entry points. Start by locating how scripts are built in the TypeScript editor and how engine-side macros work, then clarify the macro syntax and the differences between build and development modes. Done should include an agreed design and coverage for both modes.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.