<?xml version="1.0"?>
<ownershipDocument>

    <schemaVersion>X0202</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2005-01-14</periodOfReport>

    <notSubjectToSection16>0</notSubjectToSection16>

    <issuer>
        <issuerCik>0000880562</issuerCik>
        <issuerName>UNIFY CORP</issuerName>
        <issuerTradingSymbol>UNFY</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001044321</rptOwnerCik>
            <rptOwnerName>MARXE AUSTIN W &amp; GREENHOUSE DAVID M</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>153 E 53RD ST</rptOwnerStreet1>
            <rptOwnerStreet2>55TH FL</rptOwnerStreet2>
            <rptOwnerCity>NEW YORK</rptOwnerCity>
            <rptOwnerState>NY</rptOwnerState>
            <rptOwnerZipCode>10022</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>0</isDirector>
            <isOfficer>0</isOfficer>
            <isTenPercentOwner>1</isTenPercentOwner>
            <isOther>0</isOther>
        </reportingOwnerRelationship>
    </reportingOwner>

    <nonDerivativeTable>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common Stock</value>
            </securityTitle>
            <transactionDate>
                <value>2005-01-14</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>P</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness>
                <value></value>
            </transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>4500</value>
                    <footnoteId id="F1"/>
                </transactionShares>
                <transactionPricePerShare>
                    <value>0.55</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>4876700</value>
                    <footnoteId id="F1"/>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>I</value>
                    <footnoteId id="F1"/>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value>By Limited Partnerships</value>
                    <footnoteId id="F1"/>
                </natureOfOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
    </nonDerivativeTable>

    <footnotes>
        <footnote id="F1">This is a joint filing by Austin W. Marxe (Marxe) and David M. Greenhouse (Greenhouse).  They share voting and investment control over all securities owned by Special Situations Cayman Fund, L.P. (Cayman), Special Situations Private Equity Fund, LP (PE), Special Situations Technology Fund, L.P. (Tech) and Special Situations Technology II, L.P. (Tech II), respectively. 832,900 shares of Common Stock and 309,880 Wts are held by Cayman, 1,358,200 shares of Common Stock and 507,080 Wts are held by PE, 227,200 shares of Common Stock, and 84,520 Wts are held by Tech and 1,134,400 shares of Common Stock, 422,520 Wts are held by Tech II. The interest of Marxe and Greenhouse in the shares of Common Stock owned by Cayman, PE, Tech, and Tech II is limited to the extent of his pecuniary interest.</footnote>
    </footnotes>

    <ownerSignature>
        <signatureName>Austin W. Marxe</signatureName>
        <signatureDate>2005-01-19</signatureDate>
    </ownerSignature>

    <ownerSignature>
        <signatureName>David M. Greenhouse</signatureName>
        <signatureDate>2005-01-19</signatureDate>
    </ownerSignature>
</ownershipDocument>

