Skip to content

Cannot access certain Unity packages in F# script #13

@johnW-ret

Description

@johnW-ret

I can only access certain packages in an F# script

Image

If run Tools > F# > Build Assembly-FSharp but then quickly add

  <ItemGroup>
    <Reference Include="Unity.InputSystem">
      <HintPath>Library\ScriptAssemblies\Unity.InputSystem.dll</HintPath>
      <Private>False</Private>
    </Reference>
  </ItemGroup>

before the first

  <ItemGroup Condition=" '$(Platform)' == 'Editor' " />

after it gets overwritten but before the build is complete, UnityEngine.InputSystem becomes available in my F# script IntelliSense.

I clearly see the Unity.InputSystem reference under the first

  <ItemGroup Condition=" '$(Platform)' == 'Player' " />

so I'm not really sure what is going on here. The format seems to be a bit different than that in Assembly-CSharp but when doing the edit-during-build trick to edit the existing reference instead of add a new one it doesn't work.

My F# script is not in any sort of Editor folder.

Context

ProjectVersion.txt

m_EditorVersion: 6000.2.1f1
m_EditorVersionWithRevision: 6000.2.1f1 (55300504c302)

main branch as of 17110e9

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions