State and linking issue

No problem at all. It can often be very frustrating when it’s something fairly minor, but tucked away like that. Hopefully from this experience you’ll now be a bit more familiar with the GameObjects in the Hierarchy and the issues that can arise by having multiple components attached to multple GameObjects, when they don’t need to be.

In this specific case, you code was running multiple copies of itself, so one of them was good and had the references it needed, but another didn’t and it was that one which was throwing the error. Of course when you then look at the GameObject you believe you’ve got configured, it all looks good.

If you run into any issues in the future where things happen multiple times, it’s another good place to look, often students have code for keyboard input and then something happens several times because of one keypress, this is typically because the script has been attached to several GameObjects.

The cherry on the cake would probably be to get you to zip up the project files, but as we are at a good point now and I don’t need them I wouldn’t worry too much. The access issue may have been because the files were open at the time in Unity/Visual Studio etc. One for the future perhaps :slight_smile:

Yeah similar to the last issue i had with my number wizard that you so kindly helped me with. Problems with my hierarchy and multiple scripts. I need to pay close attention to this, especially if everything else is looking correct and I am finding errors.
I guess I am glad it wasn’t in the code part… I am realizing the amount of focus i need to put on the hierarchy.
Yeah onto other issues… now the zip issue for future problems that may arrive. Well I just formatted my second hard drive i am dedicating towards my game. I am thinking that an issue with permissions is probably whats going on.
(again please bare with me, some of this I only have vague knowledge of from when i was a kid and haven’t ever gotten really familiar with. I only played around with computers a bit back in the early 90s).

You can often make good use of Debug.Log for things like this too… for example, if your script if we had added a line to the Start method;

private void Start()
{
    Debug.Log("Start method executing on GameObject : " + gameObject.name);
    // other code below
}

You would have then seen multiple Debug.Log statements in the console and probably made the jump yourself to realise about the multiple instances of the script running across other game objects. :slight_smile:

I actually was fully aware of running the script under multiple different things and tried to change all of them to run text as well… I found that one i couldnt put a text to and was wondering if that would be an issue… in a way it was… :joy:

1 Like

so… yah another lesson in my hierarchy

1 Like

All good fun :slight_smile:

So dealing with new hard drives and issues of permission… It took me a while to even get around to formatting it, got that done, now just attempting to see how i change that so I can zip the files… I am finding it incredibly annoying that my computer tells me I don’t have permission to do things… Its probably a good thing though :wink:

Not sure of the relationship between the hard drive formatting and the zipping of files? Are they on the newly formatted drive or something?

Yah. I just built this computer the two months ago. It took about a month for me to get around to having the time to dive into really getting familiar with all of this. So yeah I recently formatted the drive. I had been planning on installing linux on it so I could play around with using something other than windows, however still havent gotten around to that. Really decided that I needed to just get into learning, so I put off some set up stuff that was probably pretty essential. Anyways, yes I am looking at permissions and properties to see if its somewhere in that I am able to change being able to zip…I wonder if i can zip on my C drive…

yeah I can zip from my main drive, just not my secondary drive.

Guessing you have Admin permissions on this machine? Is it just naggy message, e.g. you can just click “Continue” and it lets you, or a straight out “You dont have permission” kinda thing?

straight
Screenshot%20(24)

Who has access to this drive under the security permissions?

Here’s an example from one of my additional drives for comparison;

image

I have just been messing about in that… hopefully i am not making more of a mess for mesself…

so I can zip a specific file but not a folder?

I just tried and was able to do one actual file, however when it came to a folder it says it cant find anything, maybe it has to do with my inability to zip a file… maybe i should learn how to zip it

This any use;

Well that definitely was a journey, feeling a little side tracked from what i was trying to do, however i am sure it is good information to have and I know it helps me to understand where I am in this computer, which is definitely a very interesting concept, i remember only a little dos stuff from a very long time ago and feel like I should get back into that . I gotta only do that in short bursts and take some time each day of the progression… Alright, turned on administrator after running window system security thing… still cant zip the file exactly. I do have permissions turned on for everyone. I have run this scan and have no integrity violations. Screenshot%20(27)
However I was able to zip all the files and folders within the CYOA file… it has to send my zip file to the desktop… So at least I can I say I can zip all the files within a project… I can deal with learning more with that later… onward to making my array.

1 Like

Sounds like some progress at least. I don’t think I can really help much more with the permissions side of things, too many variables and incredibly challenging remotely, I will however wish you good luck with it! :slight_smile:

Enjoy the rest of the course :slight_smile:

1 Like

Privacy & Terms