How to hide funtions from inheritance.

Hi i was wandering if there was a way to stop the script that is inheriting from an other script to stop getting some of the function’s an example would be script A has health value and health texture so when the script is on the camera or player you can assign the texture, but if i was to access that script from another script like this

unity stuff 
unity stuff
unity stuff

public class NeedsHealthValue : Script A

blah blah blah

then in needshealthvalue when it is add’d to an object or a player it will also ask for the health texture to be assigned even tho it is already assigned in script A and i only wanted the health value of script A not the OnGUI stuff?

(i know the code is a horrible example but im quite busy so i have to get my point across quickly )
my coding language is C#.

The way to do this is to set the member on the base class to private. You have four access levels to play with

private - Only accessible by the declaring class

protected - Only accessible by the declaring class and any classes that inherit from it

internal - Only accessible by the same assembly

public - Accessible by everything

You can create a Parent class with the logic to asign Health and Texture, then have both your Script A and Script B, inherit from it.