playcanvas / playcanvas/editor

Script 'References' should include templates that use the script

Open
#2,004 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

With larger projects, Templates - are great tool to re-use and organize hierarchies.
But if instance of a template is not in scene hierarchy, then trying to find which entities use a particular script - is unfortunately not possible.

Would be great if "used" script feature would be extended to cover tamplates.
So if you right-click on a script, and "References" option would have populated with a list of templates where this script's definitions are mentioned. With appropriate icon. Clicking on which would select such template asset.

Here is a concept:
Image

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

Start from the script context menu's "References" option and trace how references in the scene hierarchy are collected. Extend the result to include templates whose script definitions are mentioned, display the appropriate icon, and make selecting a result select the template asset. The issue's concept image illustrates the expected presentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
devtools, frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.