Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Voting for the Unity Awards are OPEN! We’re looking to celebrate creators across games, industry, film, and many more categories. Cast your vote now for all categories
    Dismiss Notice
  3. Dismiss Notice

Blackmagic SDK in Unity

Discussion in 'Scripting' started by sangj82, Mar 29, 2018.

  1. sangj82

    sangj82

    Joined:
    Mar 29, 2018
    Posts:
    5
    I have a Blackmagic Decklink mini recorder to import live HD Video from SDI to Unity3D.

    I can test my capture card with Blackmagic SDK in Visual Studio Community using sample code written in C#.

    How can I use Blackmagic C# SDK in Unity? I
    want to use C# sample code from SDK not C++ code.
     
    botic likes this.
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,599
    This sounds like it would just be a straightforward DLL integration issue, but that really depends on the Blackmagic SDK and how they provide it.

    Look online for "integrating native library" in Unity3D and you will find plenty of examples. Basically you will be using C# interop to call native functions in the Blackmagic DLL, or shared library on some targets.

    If you want to use the C# stuff Blackmagic provides, it must be using a C# .NET version less than or equal to what Unity is using, which for older Unity is .NET 2.0 but for newer Unity might be a later one, I'm not sure of the status. Check with Unity.
     
    botic likes this.
  3. botic

    botic

    Joined:
    Mar 29, 2018
    Posts:
    1
    I’ve begun a project with similar requirements.
     
  4. sangj82

    sangj82

    Joined:
    Mar 29, 2018
    Posts:
    5
    Hi, Thanks for your help. I succeded to get managed DecklinkAPI.dll from c# sample of Blackmagic SDK.
    The DLL .NET framework version is 4.5 which is same as Unity 2017.

    but I still need a managed Microsoft.DirectX.Direct3D.dll which .NET version is 4.5 to get a preview monitor.
    The source of DirectX can be shown in Visual Studio, but can't find how to compile Microsoft.DirectX.Direct3D to manged dll file.
    Here is a source file about directX I want to use in Unity. This is from Blackmagic SDK Sample code.
    Thanks.
     

    Attached Files:

  5. xenoblackinc

    xenoblackinc

    Joined:
    Apr 29, 2009
    Posts:
    34
    is there a possible way to use the micro panel in unity for color correction?