© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
13 replies
Poseidon

Passing one int from one script to another

So this isa stupid Question but im using unity for a game and i want to pass one int from a script that counts how many items were collected and i want to use it in another Script as a score. I tried a lot but nothing works. I tried FindObjectOfType and it gives me an error
image.png
image.png
image.png
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

SourceGenerator multiple steps (passing data from one to another)
C#CC# / help
2y ago
❔ How to stop a script from another script?
C#CC# / help
3y ago
❔ C# Powershell, pipe one script to another?
C#CC# / help
3y ago
❔ Access button from another script
C#CC# / help
3y ago