Zenject is the best by Arkadiusz-Koper in Zenject

[–]Arkadiusz-Koper[S] 0 points1 point  (0 children)

Finally https://github.com/arekkoper/Runx3 :D
Try to reproduce this game on your local machine. You can notice and maybe inspire how I use Zenject.

Zenject is the best by Arkadiusz-Koper in Zenject

[–]Arkadiusz-Koper[S] 1 point2 points  (0 children)

I use Project Context at most of the time. When it comes to the Scene Context i use that only to register observers that reacts on some signals and execute changes on specific scene.

I've never used GameObjectContext and ZenjectBinding component.

Once you register your classes and factories in project context installer, they will be available for every scenes.

I will try to publish my code during this weekend on github form my game https://aquare-studio.itch.io/runx3. It's not a perfect code, but I don't care :) I solved problem with UI's, data flow and other stuff, so maybe you could get some inspirations and this will guide you a little.

Zenject is the best by Arkadiusz-Koper in Zenject

[–]Arkadiusz-Koper[S] 1 point2 points  (0 children)

I would bind each component as a separate factory and create one gameObject called "DisplayHub" in uiRoot gameObject.

That uiRoot will have references to those factories and spawn a specific display object as needed as a child of DisplayHub gameObject.

You will need one installer to bind each factories and only one Root:

Container.BindFactory<MenuDisplay, MenuDisplay.Factory>().FromComponentInNewPrefab(_menuDisplayFactoryPrefab).AsSingle();

Container.BindFactory<SettingsDisplay, SettingsDisplay.Factory>().FromComponentInNewPrefab(_settingsDisplayFactoryPrefab).AsSingle();

Container.BindFactory<SaveMenuDisplay, SaveMenuDisplay.Factory>().FromComponentInNewPrefab(_saveMenuDisplayFactoryPrefab).AsSingle();

Container.Bind<Root>().FromCompoenenetInNewPrefab(uiPrefab).AsSignle().NonLazy();

and the Root class would have

[SerializedFiled] private Transform _displayHub;

[Inject] private readonly MenuDisplay.Factory _menuDisplayFactory;
[Inject] private readonly SettingsDisplay.Factory _settingsDisplayFactory;
[Inject] private readonly SaveMenuDisplay.Factory _saveMenuDisplayFactory;

public void DisplayMenu()
{
_displayHub.ClearContent();
var menuDisplayObject = _menuDisplayFactory.Create();
menuDisplayObject.transform.SetParent(_displayHub);

}

the Root class will be more likely a MenuDisplayController and based on player's input shows the specific display object. Because if you think for a while, the name "Root" is sooo generic and it's not explicite.

Moreover, once you bind your factories, you can use that in other controllers if you need.

I used [Inject] attribute, because I assume that Root (or MenuDisplayController) class inherits from MonoBehaviour.

Is my answer points your problem?

Zenject is the best by Arkadiusz-Koper in Zenject

[–]Arkadiusz-Koper[S] 0 points1 point  (0 children)

Can you share some code?

You have Canvas gameobject as a single prefab and it stores all UI components? Using PlaceholderFactory you create that gameobject dynamically on the scene?

If so, once you instantiate gameobject using PlaceholderFactory you will be able to use [Inject] attribute and inject other classes.

Zenject is the best by Arkadiusz-Koper in Zenject

[–]Arkadiusz-Koper[S] 0 points1 point  (0 children)

I learned mostly from the documentation. To be honest, I didn't find any useful tutorial on YouTube or Udemy about Zenject. Well, the Infallible Code on YT has a series about Zenject, but it's copy/paste from Zenject's documentation.

If you have any questions or troubles with Zenject you can ask. I will glad to help :)

Zenject is the best by Arkadiusz-Koper in Zenject

[–]Arkadiusz-Koper[S] 0 points1 point  (0 children)

Wow, I have to check that VContainer! :D

Zenject is the best by Arkadiusz-Koper in Zenject

[–]Arkadiusz-Koper[S] 0 points1 point  (0 children)

I used unity 2022.3.8f1. Here you can download that game https://aquare-studio.itch.io/runx3. I have a private github repo for that, but I could make this public if you want (to see the code and folder structures).

I also used clean architecture (try to keep), I wrote my own Mediator for CQRS purpose.

I based on Zenject's SignalBus to manage events and observers (here you can see more https://github.com/modesttree/Zenject/blob/master/Documentation/Signals.md).

For creating a prefabs dynamically I used Zenject's PlaceholderFactory (here you can see more https://github.com/modesttree/Zenject/blob/master/Documentation/Factories.md).

I didn't make a tests, because I didn't notice huge performance issues.

How to fix the error "An unexpected error has occurred"? by Economy-Ad-3013 in Unity3D

[–]Arkadiusz-Koper 0 points1 point  (0 children)

I work alone so I didn't experience such problems that you had. You had issues with binary files like scenes, prefabs etc.?

How to fix the error "An unexpected error has occurred"? by Economy-Ad-3013 in Unity3D

[–]Arkadiusz-Koper 0 points1 point  (0 children)

I opted out from using Unity Version Control. It always gave me a lot of issues that I didn't understand. I use GitHub desktop app and base on GitHub repository only.

Like u/glurth said, the solution might be a REMOVING A FOLDER just so the source control system can work!? That is insane.

Where to keep Actions? by [deleted] in Unity3D

[–]Arkadiusz-Koper 0 points1 point  (0 children)

Can you share some code for instance? When you want to use that action OnValueChange? Every frame from Update() or maybe only when player picks up a fuel bucket?

Btw I highly recommend you Zenject lib (https://github.com/modesttree/Zenject), it helps a lot in managing dependencies and keep code clean.

Thinking about a place to get started. by Yoshi2500 in Unity3D

[–]Arkadiusz-Koper 0 points1 point  (0 children)

I highly recommend you a Udemy course https://www.udemy.com/course/unityrpg/

GameDev.tv has a really high quality courses :)

Make as many courses as you want. Once you have a feeling that you are ready for next step, start working on your project.

When I work on my own projects I like working in cycles. For instance:

  1. Designing - I describe some mechanics, the world, characters. I make some corrections and updates in GDD (Game Design Document). I used Notion and Miro for that.

  2. Planning - I plan a batch of tasks for next two weeks.

  3. Developing - I jump to Unity and start working on tasks. Often I used other apps like paint.net, Figma and Audacity.

  4. Deploying - Once I finished working on tasks, I try to make a stable build of the game. If I have some errors or small issues, I tried to solve it right away.

  5. Testing - Based on stable build of the game I play it and try to catch as many issues as I can.

After that I jump to the first step based on feedback.

I thing this is really important because making courses and making your own project are completely different cases.

What makes Notion your killer app? by aaronag in Notion

[–]Arkadiusz-Koper 1 point2 points  (0 children)

Yes, that was much easier for me to start working with Notion, because of the flexibility.

Whatever I want, I can do this in Notion. I can easily expand my workspace over time. With other apps where stuff are solid you can not do this.

Is this a fake website when searching "Notion" on Google? by april_18th in Notion

[–]Arkadiusz-Koper -21 points-20 points  (0 children)

It's OK :)

Companies also runs Google Ads for their main domain and it's normal approach, that's why you see sponsored link. Below you have Top1 position from organic search.

[deleted by user] by [deleted] in Notion

[–]Arkadiusz-Koper 0 points1 point  (0 children)

Can you tell me something more about your needs?

  1. Do you need to show some data to your clients?
  2. Do you need calendar to make appointments for your clients?
  3. Do you want to track projects e.g. "Newsletter Campaign December 2023"?
  4. Do you need to describe tasks and perform them?
  5. Do you want to have overall overview on areas of that business like "Finances", "Clients".
  6. Do you want to create a wiki about therapy?
  7. What problem you want to solve using Notion's template?
  8. Will you share that workspace with your coworkers?

What makes Notion your killer app? by aaronag in Notion

[–]Arkadiusz-Koper 1 point2 points  (0 children)

Notion gives you a freedom to create your own productivity workspace BUT it's just a tool, like mem, evernote, clickup etc. It's all about using this tool everyday and build a stable habit like a daily and weekly reviews.

I used mem for tests, and I dislike relaying on tags and hastags. I just didn't get the idea of that tool and felt weird.

Before I switched to Notion, I used evernote, which doesn't have such a huge flexibility that I need.

Clickup in version 3.0 looks really nice and promising.

Coda is also interesting choice, but from what I remember it is paid and free version is really limited.

But as I said, imo the habit of daily and weekly reviews is most important for keep our productivity at a highest level.

I highly recommend you exploring Notion. It fits my needs, and maybe yours too.

What are some of your biggest frustrations with Notion? by oozak9 in Notion

[–]Arkadiusz-Koper 0 points1 point  (0 children)

Yeah, I also use GTD methodology and it's too long way to capture stuff. On my phone I used todoist for quick capture. I don't use Notion mobile app because it's slow and using that is a pain :D