gustavopsantos / Reflex

Minimal dependency injection framework for Unity
MIT License
730 stars 51 forks source link

Proposal: PrefabScope #27

Closed galman33 closed 1 year ago

galman33 commented 1 year ago

Pull Request Template

Description

Added a PrefabScope for automatically creating a nested scope when instantiating a prefab if available.

Type of change

Please delete options that are not relevant.

How Has This Been Tested?

Currently only tested manually. I created this PR to check if this proposed feature is desirable.

Checklist:

gustavopsantos commented 1 year ago

@galman33 In which cases do you think a prefab scope helps? Its a need for the project youre currently working on? Maybe you can share more about your specific need.

gustavopsantos commented 1 year ago

@galman33 bump

galman33 commented 1 year ago

Hey, sorry I missed your last comment. It's for mainly used for self contained prefab, think like sub-scenes which are made using prefabs instead of scenes. It provides more flexibility and also allows for instantiating the same prefab multiple times in the same scene with separated contexts, if that makes sense.

gustavopsantos commented 1 year ago

@galman33 Hmm I see, I think its gonna be a great addition. Can you finish the MR so I can review it? Remember to update documentation as well

gustavopsantos commented 1 year ago

Closing without activity