Code Monkey home page Code Monkey logo

unitycopylightingsettings's Introduction

Copy Lighting Settings for Unity

The "Copy Lighting Settings" package allows you to copy&paste lighting settings from one scene to another.

The need for this functionality is based on an Unity forum thread, where several community members wonder how to transfer the lighting settings from one scene to another.

I found this to be an interesting problem to solve and thus looked into it. In the video below, I show how the tool can be used.

How it works

Copying the "Sun Source" setting is a special case that is explained below, all other settings are just copied as you would expect.

"Sun Source" is a reference to a Light Component in the scene, but Unity does not support cross scene references. Therefore the tool does not copy&paste the reference, but it looks for a Light with the same name (upper/lower-case ignored) in the target scene. It looks first for active lights, then inactive lights.

If a Light with the same name exists in the target scene and there is currently no "Sun Source" assigned, then the tool sets it to the Light found in that scene.

Installation in Unity 2019.3 and newer

In Unity's Package Manager, choose "Add package from git URL" and insert one of the Package URL's you can find below.

Package URL's

Version Link
1.6.0 https://github.com/pschraut/UnityCopyLightingSettings.git#1.6.0
1.5.0 https://github.com/pschraut/UnityCopyLightingSettings.git#1.5.0
1.4.0 https://github.com/pschraut/UnityCopyLightingSettings.git#1.4.0
1.3.0 https://github.com/pschraut/UnityCopyLightingSettings.git#1.3.0

Installation in older Unity versions

If you use an older Unity version than 2019.3, the Package Manager might not exist or might not have git support yet.

In this case, I believe the easiest way is to download the Editor/CopyLightingSettings.cs file from this repository and save it in your project under Assets/Editor/CopyLightingSettings.cs.

Credits

If you find this package useful, please mention my name in your credits screen. Something like "CopyLightingSettings by Peter Schraut" or "Thanks to Peter Schraut" would be very much appreciated.

unitycopylightingsettings's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.