Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 3 4 [5]

Author Topic: An LCS Remake  (Read 6131 times)

The Cheshire Cat

  • Bay Watcher
    • View Profile
Re: An LCS Remake
« Reply #60 on: November 21, 2018, 03:59:43 pm »

Are you opening it through Unity and the "Open C# project" menu option in that, or just directly in visual studio? The thing about Unity projects is that they aren't actually standard C# code and you can't just compile them with VS.

The hierarchy I was talking about isn't the scripts, but the scene hierarchy in the Unity editor:

Logged
LCS Graphical Remake:

https://the-cheshire-cat.itch.io/lcs
Current progress: ~100%

SlatersQuest

  • Bay Watcher
    • View Profile
Re: An LCS Remake
« Reply #61 on: November 21, 2018, 06:18:26 pm »

There does not appear to be an "Open C# project" menu option in this version of Visual Studio (perhaps because I'm developing this on a Mac?).

What I did to open the file was File -> Open -> LCS.CSharp.csproj

Is there another way to open it?


Edit: I also don't recognize your screenshot. There is no "Main Camera" object that I have been able to find anywhere...

Edit to edit: found out that I was opening the wrong Unity. Now I can see the window you are showing there, but I cannot find where the scripts are that actually contain the code!
« Last Edit: November 21, 2018, 06:23:48 pm by SlatersQuest »
Logged

The Cheshire Cat

  • Bay Watcher
    • View Profile
Re: An LCS Remake
« Reply #62 on: November 21, 2018, 08:04:41 pm »

In the Unity "Assets" menu there should be an "Open C# project" option at the bottom which will open visual studio with a connection to the Unity editor, which will allow it to read and compile the scripts properly.
Logged
LCS Graphical Remake:

https://the-cheshire-cat.itch.io/lcs
Current progress: ~100%

SlatersQuest

  • Bay Watcher
    • View Profile
Re: An LCS Remake
« Reply #63 on: November 22, 2018, 04:18:26 pm »

All right, got that. Now, how does Unity attach each script to each element in the hierarchy? For example, I am looking at the object entitled 'Liberal Agenda' in the hierarchy, but I don't see any reference to LiberalAgendaImpl or any of the other script elements. How are these connected?
Logged

The Cheshire Cat

  • Bay Watcher
    • View Profile
Re: An LCS Remake
« Reply #64 on: November 23, 2018, 09:06:17 pm »

That's related to Unity's component interface. Here's a screenshot of the Liberal Agenda game object selected in the inspector (note: your layout might not look exactly like this since I don't remember what the default arrangement is but all of the elements should be there somewhere):

https://i.imgur.com/l0vTMFL.png
(linked because it's a fullscreen image)

On that object are two components, the Rect Transform (which is a default component that will be on every UI element) and the actual Liberal Agenda Impl script. The various things inside the second component are all the hooks for the public members of the class - basically this is how Unity sets the default values of a monobehaviour instead of using a constructor. So for a few examples, the UI Controller is, in the script code itself "public UIControllerImpl uiController;" - just being public exposes it to the Unity interface. Then it's set by just dragging in an object that has on it a UIControllerImpl component (in this case, the MasterController object that's farther down the hierarchy window). Not all of those references are to other objects in the scene - some of them might be image or prefab references being pulled from the asset explorer in the project tab in the bottom right. If you want to see where any of the actual referenced objects are, you can just click on them once on the LiberalAgendaImpl component and it will highlight it in the hierarchy/project window.

You might want to look up some basic Unity tutorials if you want to dig into editing the code/interface itself. Basically everything I did was very simple usage of the built in UI system, which is mostly playing with layouts, and then having some master objects to handle all the logic and read data from the game state to feed into the UI.
Logged
LCS Graphical Remake:

https://the-cheshire-cat.itch.io/lcs
Current progress: ~100%

SlatersQuest

  • Bay Watcher
    • View Profile
Re: An LCS Remake
« Reply #65 on: Today at 01:40:42 pm »

I just posted a thread (link) about the new game I want to design and leave for discussion as to which version of LCS to start with to modify from.
Logged
Pages: 1 ... 3 4 [5]