Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/roytheunissen/scene-view-picker
Unity extension that lets you assign any Object field by choosing it from the scene view.
https://github.com/roytheunissen/scene-view-picker
Last synced: 3 days ago
JSON representation
Unity extension that lets you assign any Object field by choosing it from the scene view.
- Host: GitHub
- URL: https://github.com/roytheunissen/scene-view-picker
- Owner: RoyTheunissen
- License: mit
- Created: 2020-09-13T09:31:22.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-11-18T09:33:08.000Z (about 1 month ago)
- Last Synced: 2024-12-23T16:57:16.558Z (6 days ago)
- Language: C#
- Size: 341 KB
- Stars: 69
- Watchers: 5
- Forks: 9
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.MD
- License: LICENSE.md
Awesome Lists containing this project
README
[![Roy Theunissen](Documentation~/GithubHeader.jpg)](http://roytheunissen.com)
[![License: MIT](https://img.shields.io/badge/License-MIT-brightgreen.svg)](LICENSE.md)
![GitHub Follow](https://img.shields.io/github/followers/RoyTheunissen?label=RoyTheunissen&style=social)
_Unity extension to allow you to assign Object fields by picking it from the scene view_
## About the Project
Sometimes scene hierarchies get complex and you get in a frustrating situation where you need to assign a field and you know exactly where it is in the scene, but it's hard to point out in the hierarchy. I figured: why not make something to allow you to assign fields by pointing where the object is in the scene? That's exactly what this is.
[Video](https://youtu.be/SVsugZvvoHA)
![Example](Documentation~/Example.gif)
## Getting Started
- Add the package to your Unity project (tips on how to install it are in the Installation section)
- Open a script with fields derived from Object
- Click the new button next to the hierarchy picker
- Left Click to pick the desired object from the scene
- Middle Click to pick from nearby objects when they are cluttered together
- Right Click to cancel## Extras
- If you want a callback whenever a field is assigned via picking, add the `[PickCallback("OnPicked")]` attribute
- You can specify the name of a method to be called
- This method can be parameterless or have two parameters of the same type of the field
- In the latter case, the previous and current value are provided## Installation
### Package Manager
Go to `Edit > Project Settings > Package Manager`. Under 'Scoped Registries' make sure there is an OpenUPM entry.
If you don't have one: click the `+` button and enter the following values:
- Name: `OpenUPM`
- URL: `https://package.openupm.com`Then under 'Scope(s)' press the `+` button and add `com.roytheunissen`.
It should look something like this:
![image](https://user-images.githubusercontent.com/3997055/185363839-37b3bb3d-f70c-4dbd-b30d-cc8a93b592bb.png)
All of my packages will now be available to you in the Package Manager in the 'My Registries' section and can be installed from there.### Git Submodule
You can check out this repository as a submodule into your project's Assets folder. This is recommended if you intend to contribute to the repository yourself
### OpenUPM
The package is available on the [openupm registry](https://openupm.com). It's recommended to install it via [openupm-cli](https://github.com/openupm/openupm-cli).```
openupm add com.roytheunissen.sceneviewpicker
```### Manifest
You can also install via git URL by adding this entry in your **manifest.json**
```
"com.roytheunissen.sceneviewpicker": "https://github.com/RoyTheunissen/Scene-View-Picker.git"
```### Unity Package Manager
```
from Window->Package Manager, click on the + sign and Add from git: https://github.com/RoyTheunissen/Scene-View-Picker.git
```## Contact
[Roy Theunissen](https://roytheunissen.com)[[email protected]](mailto:[email protected])