1. Code:
    [PluginReference]
    Plugin AspectRatio;
     
  2. int ratio = (int)(Interface.Oxide.CallHook("GetAspectRatio", player.userID) ?? 0); // work
    int ratio = (int)(PluginAspectRatio?.Call("GetAspectRatio", player.userID) ?? 0); // not work
    [DOUBLEPOST=1453625562][/DOUBLEPOST]
    Not work, AspectRatio is null.
    [DOUBLEPOST=1453635699,1453624462][/DOUBLEPOST]This code is work.
    Code:
    var plugins = Interface.Oxide.GetLibrary<Plugins>();
    PluginAspectRatio = plugins.Find("AspectRatio");
     
  3. The PluginReference field is not available in the CSPlugin class, only in CSharpPlugin and its derived classes (the specific game plugin classes).
    And when you are using PluginReference in a CSharpPlugin (or RustPlugin,......) then you should be able to use them like so:
    Code:
    [PluginReference] Plugin ThePluginsFileName;
    or if the plugin contains invalid characters that you cannot use as the name of a variable
    Code:
    [PluginReference("0-FriendsApi")] Plugin FriendsApi;