Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Questions about accessing other project scripts in Unity(C#) #2787

Closed
GameHuiTea opened this issue Nov 28, 2018 · 6 comments
Closed

Questions about accessing other project scripts in Unity(C#) #2787

GameHuiTea opened this issue Nov 28, 2018 · 6 comments
Assignees
Labels

Comments

@GameHuiTea
Copy link

  • Before opening a new issue, we wanted to provide you with some useful suggestions (Click "Preview" above for a better view):

  • All users are welcomed to report bugs, ask questions, suggest or request enhancements and generally feel free to open new issue, even if they haven't followed any of the suggestions above :)


Required Info
Camera Model { D415 }
Firmware Version (Open RealSense Viewer --> Click info)
Operating System & Version {Win (10)
Kernel Version (Linux Only)  
Platform PC
SDK Version { 2.0 (build 2.16.5) }
Language {unity }
Segment { }

Issue Description

<Describe your issue / question / feature request / etc..>
proejctissue

hello, have a good day!
I want to access the red square box script from the script in the yellow square box. but I can't access.
The script in the yellow square box does not find the class in the red square box.
In a red square box, I can access the classes in a yellow square box, but not the reverse.

What should i do?
thank you for reading!

@GameHuiTea GameHuiTea changed the title Questions about accessing other project scripts in Unity Questions about accessing other project scripts in Unity(C#) Nov 28, 2018
@dorodnic dorodnic added the unity label Nov 28, 2018
@GameHuiTea
Copy link
Author

@dorodnic Do you have any keywords for this problem?? I have no idea TAT

@dorodnic
Copy link
Contributor

Hi @GameHuiTea
I'm not sufficiently familiar with the Unity wrapper, perhaps @ogoshen or @matkatz could comment?

@ogoshen
Copy link
Contributor

ogoshen commented Nov 29, 2018

Red & Yellow are actually two different assemblies.
See Unity's docs about ScriptCompilationAssemblyDefinitionFiles, and how to add references in the inspector.

Now it is my understanding that you are trying to add functionality to the RealSense components from external scripts which are separated on purpose. I suggest you keep them decoupled and redesign your components.

If you could post snippets of what you're trying to accomplish we might be able to help better.

@GameHuiTea
Copy link
Author

GameHuiTea commented Nov 30, 2018

Thank you for reply!
I would like to call the CDepthFrameMgr.sc function in the red square box at RSDevice.sc.

I don't know what to do about "I suggest you keep them decoupled and redesign your components."

I still don't know what to do. I want to know what more information I should give you.

@HippoEug
Copy link

I am not too sure, but take a look at my simple question/issue. See the Goal part.

Maybe you should post an example of what you are trying to accomplish by modifying the Realsense code.

@GameHuiTea
Copy link
Author

I'm a little ignorant, but I found a way!
I made a new script and used it to copy the code of the script in the yellow square box.
It's working without a problem at the moment.

Thank you all for your answers!!

gwen2018 pushed a commit to gwen2018/librealsense that referenced this issue Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants